in reply to
Re^2: Custom Sort An AoA
in thread Custom Sort An AoA
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.
my $result = @$a <=> @$b;
my $idx = $#$a;
while (!$result && $idx >=0)
$result = $a->[$idx] cmp $b->[$idx];