in reply to Order of files returned by readdir

Actually the order won't even be consistent. For example, deleting an entry then adding another will likely change the order somewhat. The order depends on the operating system and the file system that is being used.

With Windows for example, readdir most likely uses FindFirstFile/FindNextFile which don't specify the order files are returned.


DWIM is Perl's answer to Gödel