foreach (sort { ($saved_key{$b} <=> $saved_key{$a}) || ($a cmp $b) } keys %saved_key)
That sorts the hash by values (numerically), and then by keys (alphabetically) In reply to Re: Twice the pleasure of sorting a hash
by Anonymous Monk
in thread Twice the pleasure of sorting a hash
by coldfingertips
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |