The reverse method only works if your values are unique. If they are and you will be doing a lot of reverse lookups then it's worth building a reverse lookup hash. This is far simpler than it sounds:
--my %rev_hash = reverse %hash;
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Finding a hash key from the value (reverse lookup)
by davorg
in thread Finding a hash key from the value (reverse lookup)
by ryddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |