The file codes are of the form
abc01, abc02, abc03, ... abc10, abc11, ...abc99, abc100, abc 101 etc.
Each document in any given sort procedure has the same "abc" (and the "abc" is a known string).
ie the problem with a normal string sort is that the numerical part is just two digits long for 01 to 99 but three digits long for 100 onwards.
What is the most efficient means of doing this sort?
many thanks in advance...
use Sort::Fields;
And sort like so:
@newsorted = fieldsort '\¦', ['-21n'], @db;
(Reverse sort with delimiter '¦', the 21st Field, n for numerical (so 8 comes before 81) from array @db to array @newsorted)