my $name = $_;
You need to prepend the directory, beacuse readdir only returns the filename and not the complete path to it. Also see the documentation of readdir, which states your use case:
... If you're planning to filetest the return values out of a readdir, you'd better prepend the directory in question. ...
In reply to Re: Search windows folder for old files...
by Corion
in thread Search windows folder for old files...
by Wizbiscuit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |