http://qs1969.pair.com?node_id=906207


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

values will return an array of values from a hash. The array will be in hash-sorted order.
Similarly keys will return an array of keys from a hash. The order of the two arrays will match.
my %hash = ( a=>1, b=>2, c=>3); my @v = values %hash; # e.g. ( 2, 3, 1 ) my @k = keys %hash; # e.g. ('b', 'c', 'a')