title: How to print specific key in an array (Perl)
body: <p>I recently started learning Perl, so I'm not too familiar with the functions and syntax.
  If I have a Perl array and some variables,</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  my @numbers = (a =&gt;1, b=&gt; 2, c =&gt; 3, d =&gt;4, e =&gt; 5);
  my $x;
  my $range = 5;
  $x = int(rand($range));
  print "$x";
  </code></pre>
  
  <p>to generate a random number between 1-5, how can I get the program to print the actual key (a, b, c, etc.) instead of just the number (1, 2, 3, 4, 5)? </p>