in reply to How do I sort a hash of arrays by value THEN by key?
You can chain any number of conditions with the || operator. The special globals $a and $b get the keys (e.g., 'part2') to compare.sort { $href->{$b}[ 1 ] cmp $href->{$a}[ 1 ] || $b cmp $a } keys %data;
--
[ e d @ h a l l e y . c c ]
|
|---|