http://www.perlmonks.org?node_id=660820


in reply to sorting a hash by value with ties

Hi craigt

Try this

print "$_:$hash{$_}\n" for (sort {$hash{$a} cmp $hash{$b}} keys %hash) +;

Punitha