my @keys = sort(keys(%hash)); for(my $i=$#keys; 0 <= $i; $i--) { print $hash{$keys[$i]}; }
In reply to Re^2: algorithm question: want to sort keys of hash by their values.
by yaneurabeya
in thread algorithm question: want to sort keys of hash by their values.
by downer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |