http://qs321.pair.com?node_id=906236


in reply to How to print key and value of hash in a list

You can also print the keys and values of a hash in the following way.
my %hash = ( '1' => 'One', '2' => 'Two', '3' => 'Three', + ); print "Key: $_ and Value: $hash{$_}\n" foreach (keys%hash);