perl order of opendir return results?
- by ojblass
opendir MYDIR, "$dir";
my @FILES = readdir MYDIR;
closedir MYDIR;
It appears that 99.9 % of the time the first two entries in the array are always “.” and “..”. Later logic in the script has issues if it is not true. I ran into a case where the directory entries appeared later. Is this indicative of the file system being corrupt or something else? Is there a known order to what opendir returns?