If all the data were numeric and limited in length, you could zero-pad it before the join and then CMP it since <=> will probably explode on longer arrays.
If you need it to be fully generic, you could always break down and make the sort block be a complex sub that loops over the elements and returns once it finds a difference.
sub sortIt { my $result = @$a <=> @$b; my $idx = $#$a; while (!$result && $idx >=0) { $result = $a->[$idx] cmp $b->[$idx]; $idx--; } return $result; }
In reply to Re^3: Custom Sort An AoA
by SuicideJunkie
in thread Custom Sort An AoA
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |