in reply to highest value in hash
You have $highest=$key if ($highest < $value) ;
You're storing the key, and comparing the key to the value
But it sounds like you want to compare values, not keys
So you need to store $highest_key and $highest_value, and compare $highest_value to $value
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: highest value in hash (key is not value)
by maciej (Initiate) on Mar 31, 2013 at 03:54 UTC | |
by Anonymous Monk on Mar 31, 2013 at 04:41 UTC |
In Section
Seekers of Perl Wisdom