use List::Util qw[ reduce ]; my $worstKey = reduce{ $hash{ $a } < $hash{ $b } ? $a : $b } keys %hash; print "The worst is $worstKey with a time of $hash{ $worstKey } minutes";