in reply to how do I sort numerically on sections of data that is alphanumeric
Or, there is the Schwartzian Transform.
--
Brovnik
Note: If the 'A' in column 3 is always 'A' and the columns are null padded, then you don't need the substr and can use# array is in @sorted my @sorted = map {$_->[0] } sort {$a->[2] <=> $b->[2] or substr($a->[3],1) <=> substr($b->[3],1)} map {[$_,split)] } @unsorted;
Note the switch to cmp since this now a string.sort { $a->[2] <=> $b->[2] or $a->[3] cmp $b->[3] }
--
Brovnik
In Section
Seekers of Perl Wisdom