my %hashName = (a => -1, b => -2, c => -3); my $max = 0; $_ > $max and $max = $_ for values %hashName; print $max; __END__ 0 # expected -1