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. opendir(DIR, $some_dir) || die "can't opendir $some_di +r: $!"; @dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DI +R); closedir DIR;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: Why is Stat() Not Stating All Files?
by merlyn
in thread Why is Stat() Not Stating All Files?
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |