in reply to Re: Sorting path names with Sort::Key
in thread Sorting path names with Sort::Key
A couple of tips:
use Sort::Key::Natural qw( natkeysort ); my @sorted = natkeysort { tr|\\/|\0|r } @paths;
Of course, this still ignores case-insensitive volumes, as well as paths containing «.» and «..». But what can you do? (Well, «.» can be addressed, but there's no obvious solution if any exist for the rest.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sorting path names with Sort::Key
by Anonymous Monk on Jan 10, 2025 at 13:40 UTC | |
by salva (Canon) on Jan 23, 2025 at 13:28 UTC | |
|
Re^3: Sorting path names with Sort::Key
by Anonymous Monk on Jan 10, 2025 at 18:22 UTC |