in reply to Obtain Key from Hash using value
twaddle:
Freqently-asked question ...
my %hash = ( a=>1, b=>2, c=>3 ); my $val = 2; my @keys = grep { $hash{$_}==$val } keys %hash; print "Keys: ", join(", ", @keys), "\n"; [download]
...roboticus