in reply to perl sorting
Completely untested, just an idea:
Update: oops, left the array indexes off $a and $b@sorted = map { join "", @$_ } sort { no warnings qw/numeric uninitialized/; (grep $_, map { $a->[$_] <=> $b->[$_] || $a->[$_] cmp $b->[$_] } 0..($#$a+@$b) )[0] || 0 } map { [ split /(?<=\d)(?=\D)|(?<=\D)(?=\d)/, $_ ] } @array;
|
|---|