in reply to Re: how do I sort on two fields in a hash table?
in thread how do I sort on two fields in a hash table?

What lhoward said, but if the values in $junk{count} are numerical values (as seems likely), the first half of the sort should use the spaceship comparison operator: {$b->{count} <=> $a->{count} Otherwise 12 will sort before 2.

Note that quotes inside the curly braces are not needed.

And discussions of the Merlynian Schwartzian Transform can be found here, here, and here. (Heady stuff but great when you need it!)