in reply to Quasi-sorting a hash by value

Sure, you can do a sort by value, and keep the sorted list of keys in an array.
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"; }
Then, if you just want the largest one, that's in the 0th element of @sorted:
printf "Largest is team %s: %d\n", $sorted[0], $hash{ $sorted[0] };
Is that what you wanted?