in reply to Order of files returned by readdir

Perl's readdir is for the most part a frontend/wrapper for an OS system call (readdir on UNIX) so don't expect sugar-coated responses. On Solaris (and probably other UNIX varients) you will get '.' and '..' back as well. If I was going to assume anything it would be that it returns the contents of the directory in the order they were created in (i.e. like a queue). But as previosuly mentioned, sort it yourself if you need a specific order.

Replies are listed 'Best First'.
Re^2: Order of files returned by readdir
by helgi (Hermit) on Mar 02, 2006 at 11:38 UTC
    On Solaris (and probably other UNIX varients) you will get '.' and '..' back as well.

    On Windows as well.


    --
    Regards,
    Helgi Briem
    hbriem AT f-prot DOT com