in reply to Selecting a specific hash key to find a value

zejames is right, but I'd also like to mention that if you're just using a hash to map consecutive integers to values, you might want to consider using an array instead. It can make it a lot easier to modify your values later (say, adding an item into the middle without renumbering everything manually).
#!/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";