in reply to sorting an array mix
In the interests of completeness, here's an ST implementation (update: with alphabetic case folding)
See Schwartzian Transform and Advanced Sorting - GRT - Guttman Rosler Transform for more infomy @g = qw(St1 St10 St2 St12 St6 St8 ab3 ab0 st5); my @b = map { $_->[2] } sort{ lc $a->[0] cmp lc $b->[0] || $a->[1] <=> $b->[1] } map { [/(\D*)(\d*)/, $_] } @g; foreach my $x (@b){ print "$x\n"; }
|
|---|