#! perl -slw use strict; use List::Util qw[ max ]; my %some_hash = ( sunny => .63, cloudy => .17, rainy => .2 ); my $max = max values %some_hash; print +{ reverse %some_hash }->{ $max }, ' :: ', $max; __END__ C:\test>539366 sunny :: 0.63
In reply to Re: max key-value pair in a hash
by BrowserUk
in thread max key-value pair in a hash
by kettle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |