my %hash = ( BlueTeam => 8, RedTeam => 2, GreenTeam => 4 ); my @sorted = sort { $hash{$b} <=> $hash{$a} } keys %hash; for my $team (@sorted) { print $team, " => ", $hash{$team}, "\n"; } #### printf "Largest is team %s: %d\n", $sorted[0], $hash{ $sorted[0] };