Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: highest value in hashby Athanasius (Archbishop) |
on Mar 31, 2013 at 02:44 UTC ( [id://1026319]=note: print w/replies, xml ) | Need Help?? |
Hello maciej, and welcome to the Monastery! Expanding on the advice from Anonymous Monk, here is one way to implement the solution:
Output:
Note that this uses < to compare values numerically. To compare the values as strings, you would need to use lt instead:
Hope that helps, Update: ++Anonymous Monk for the syntax below: it’s both simpler and more efficient. Confession: I had to re-read the documentation for each to verify that it Does the Right Thing here (it does). :-)
In Section
Seekers of Perl Wisdom
|
|