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

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I was on the FAQ here and tried to sort this hash on it's value. The value is a number and this keeps erroring out. I guess it would also be nice to sort alphabetically on the KEY if the values are the same, if that isn't too much harder.
foreach (sort $hash{$a} cmp $hash{$b} keys %hash)