![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Re: Sorting Files with Numbersby dmmiller2k (Chaplain) |
on Dec 31, 2002 at 15:08 UTC ( #223330=note: print w/replies, xml ) | Need Help?? |
Your solution fails to sort by the alpha prefix first. See dragonchild's answer, above, which groups files first by their alpha prefix, then numerically by suffix. Update: jdporter's solution (here) might be even more efficient with this dataset, since it uses \D+ (non-digits) rather than \w+ (word characters) to match the prefix, but it will also match punctuation and other non-alpha characters (which may not be what you want).
In Section
Seekers of Perl Wisdom
|
|