cr8josh has asked for the wisdom of the Perl Monks concerning the following question:
Greetings. I've been looking at previous threads but can't find anything about my particular problem.
I need to sort an array of filenames, to match how Windows would sort them in Explorer.
Using a "natural" sort gets me extremely close, with one discrepancy. I've tried both Sort::Naturally and Sort::Key::Natural.
Those modules sort these two things as follow:
HC_TalkRoar_1b
HC_TalkRoar_1
Windows sorts them as follows:
HC_TalkRoar_1
HC_TalkRoar_1b
I can't quite believe I'm having such a hard time finding something to reproduce Windows file-sorting order, and would greatly appreciate any assistance!
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Natural Sort / Windows sort problem
by ikegami (Patriarch) on Oct 30, 2017 at 17:31 UTC | |
by cr8josh (Sexton) on Oct 30, 2017 at 17:40 UTC | |
|
Re: Natural Sort / Windows sort problem
by huck (Prior) on Oct 30, 2017 at 17:59 UTC | |
by cr8josh (Sexton) on Oct 30, 2017 at 20:03 UTC | |
|
Re: Natural Sort / Windows sort problem
by salva (Canon) on Oct 31, 2017 at 07:53 UTC | |
by cr8josh (Sexton) on Oct 31, 2017 at 15:54 UTC |