sort { my $compare; for (my $i = 0; !$compare && $i < @$a; ++$i) { $compare = $a->[$i] cmp $b->[$i]; } return $compare; }