On Mon, Nov 25, 2002 at 02:52:42PM +0000, Steve Tickle wrote:
> Apologies for this since it's not strictly a Linux problem but I'm trying
> to do what I hoped was the relatively simple task of listing the contents
> of a directory in alphabetical order using a perl script.
Perl's sorting by default isn't alphabetical really, so you're probably
interested in the block argument to sort();
Well the problem is that the filename contains a date and is in the form
something-dd-mm-yyyy. sort() works OK as long as the filename is
something-01-mm-yyyy to something-09-mm-yyyy. When it gets to
something-10-mm-yyyy it inserts the file between something-01-mm-yyyy and
something-02-mm-yyyy.