|P is for Practical|
highest value in hashby maciej (Initiate)
|on Mar 31, 2013 at 02:03 UTC||Need Help??|
maciej has asked for the
wisdom of the Perl Monks concerning the following question:
Hi, I've recently been learning a bit of perl and this site has been super helpful, so thanks to everyone who contributes.
Anyway, I've come across a problem I cannot seem to be able to figure out. I'm trying to find the coresponding key for the highest value of a hash.
My attempt is:
and my results look like:
Where as I am trying to get the last line to say "1 key has the highest value" since the value of "1" is "8"... Both keys 1 and 4 have a higher value than 2.
any tips are much appreciated.