Or:
for my $key (sort {$hash{$a} <=> $hash{$b}} keys %hash) { print "$key: $hash{$key}\n"; }
or maybe even:
print "$_: $hash{$_}\n" for sort {$hash{$a} <=> $hash{$b}} keys %hash;
In reply to Re^2: hash sort by the values and get the keys
by GrandFather
in thread hash sort by the values and get the keys
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |