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.