in reply to Re^2: min and max in a hash of hash
in thread min and max in a hash of hash
That will give you the minimum value for each year. The OP wanted just the overall minimum. If he doesn't need the y/m of the minimum, then he could use
use List::Util qw( min max ); my $min = min map { min values %{$Year{$_}} } keys %Year; my $max = max map { max values %{$Year{$_}} } keys %Year;
Update: Fixed s/values/keys/ as per reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: min and max in a hash of hash
by pRaNaV (Novice) on Jan 22, 2012 at 12:02 UTC | |
|
Re^4: min and max in a hash of hash
by Anonymous Monk on Jul 17, 2014 at 19:52 UTC | |
by AppleFritter (Vicar) on Jul 17, 2014 at 20:47 UTC |