in reply to Re^4: max value in a hash
in thread max value in a hash
use strict; use warnings; use List::Util qw(max); my %hoa = ( a => [(1..3)], b => [(4..6)] ); for (sort keys %hoa) { print "$_ ", max(@{$hoa{$_}}), "\n"; } __END__ a 3 b 6
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: max value in a hash
by sesemin (Beadle) on Sep 14, 2008 at 20:52 UTC |