in reply to Map Function Weirdness

Not sure what your point is, but see also values and List::Util (if you don't need the intermediate array)...
use strict; use warnings; use List::Util qw(max); my %hash = (1=>10,2=>20,3=>30,4=>40,5=>50); my $max = max(values %hash); print "Max value was $max\n"; __END__ Max value was 50

Replies are listed 'Best First'.
Re^2: Map Function Weirdness
by rthawkcom (Novice) on Nov 08, 2011 at 20:04 UTC
    The intermediate array is needed. This is just a simplified version of the actual code to demonstrate the strangeness.