my @by_stud = map { my $t = $scores{$_}; [sort { $t->{$b} <=> $t->{$a} } keys %{$t}] } keys %scores;
Update: Actually, I just checked perldoc perldsc and it gives almost an exact example of sorting a similar HoH. Search for Access and Printing of a HASH OF HASHES.
In reply to Re: how do i sort values of a hash of hash
by Fletch
in thread how do i sort values of a hash of hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |