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";
...roboticus
In reply to Re: Obtain Key from Hash using value
by roboticus
in thread Obtain Key from Hash using value
by twaddlac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |