http://www.perlmonks.org?node_id=136183


in reply to Reading Filenames

The order of files returned from readdir is highly system dependent and can not be relied upon. Usually, it depends on how the directory is stored on the underlying filesystem.