Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: How to compare hash values within the same hash?by roboticus (Chancellor) |
on Sep 24, 2013 at 23:58 UTC ( [id://1055569]=note: print w/replies, xml ) | Need Help?? |
I like to invert the hash for things like this. This way, you get a list of the keys for each value:
But if you don't find the list of keys useful, or if there's too much data, just incrementing a counter as you suggest will do the job. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|