my @filenames = readdir DIR; ... foreach my $file (@filenames) { if( -d $file or $file eq $0 ) ... }
I doubt that the 2d part of the test will produce the desired result beacuse of ...
readdir DIRHANDLE ... If you're planning to filetest the return values out of a "readdir", you'd better prepend the directory in question. Otherwise, because we didn't "chdir" there, it would have been testing the wrong file.
In reply to Re^2: File::Find problems
by parv
in thread File::Find problems
by hokie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |