in reply to Selecting a specific hash key to find a value
#!/usr/bin/perl print "Give me a number for the tile and I will tell you the color\n"; chomp($a=<STDIN>); print $a."\n"; @Number = qw(Red Yellow Green Black Purple Pink Brown Blue Orange); print $Number[$a-1]."\n";
|
|---|