This is probably what you want to do:
foreach my $key ( map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [$_, $list{$_}] } keys %list ) { ...
See the Schwartzian Transform for more info.
Update: ok.. so I probably must have added the <joke> tags around ;) I figured it would be obvious... since the guy already has a subroutine to sort in. :).
In reply to Re: Sorting by the hash value
by Chady
in thread Sorting by the hash value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |