in reply to Strange problem with stat
Don't even bother with ls. As you've found, that has its own tricky stuff, and isn't portable. Just use Perl built-ins, such as something like this: (note, untested)
HTHopendir D, '.' or die "Can't opendir .: $!\n"; while (readdir D) { # The body of your loop stays the same. } closedir D;
|
|---|