in reply to Re: Re: hashes sorted by value, but displaying both keys and values
in thread hashes sorted by value, but displaying both keys and values
No problem, just throw an extra comparison in the sort block as documented in perldoc -f sort:
sort { $values{$a} <=> $values{$b} || $a cmp $b } keys %values
|
|---|