Welcome to the Monastery | |
PerlMonks |
Re: getting hash key with valueby Fletch (Bishop) |
on Apr 16, 2008 at 00:17 UTC ( [id://680693]=note: print w/replies, xml ) | Need Help?? |
Given the constraint that the values are distinct, just make a reverse mapping and use that. my %vals_to_keys; @vals_to_keys{ values %src } = keys %src;
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|