in reply to Why is Stat() Not Stating All Files?

You can also glob to get the names of files:

for (glob $dirtoread . '*') { my @stats = stat; # . . . }
That will eliminate the dot directories from consideration, and the path to the files will be part of the names in the list. You might want to make print conditional on -f _ to eliminate directories from output.

After Compline,
Zaxo