in reply to Re^2: sorting a directories content
in thread sorting a directories content
The Schwartzian Transform is indeed most appropriate in this case. However your sort code is a little buggy. OP may have better luck with:
print join "\n", map {"$_->[0]"} sort {$a->[1] <=> $b->[1]} map {[$_, +-M]} @DirList;
Note that the replies to What is "Schwarzian Transform" (aka Schwartzian) contain many useful comments and references pertaining to the Schwartzian Transform too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: sorting a directories content
by ikegami (Patriarch) on Apr 13, 2007 at 22:53 UTC |