perlquestion
phildeman
Is there a way to compare the values of one hash (while looping through the hash) and determine how many times<br />
a value has occurred in the hash?<br /><br />
$hash = (<br />
key1 => 10,<br />
key2 => 10,<br />
key3 => 3,<br />
key4 => 5,<br />
key5 => 10<br />
);<br /><br />
In the hash, above, there are 3 occurrences of the value 10. I need to do this in order display the value<br />
that has the highest frequency. Perhaps, there is a way to loop through the hash to compare the current<br />
value to the previous value, then increment a counter variable by 1?<br /><br />
Any suggestions?<br /><br />
Thanks.