in reply to Search windows folder for old files...
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. ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Search windows folder for old files...
by Wizbiscuit (Initiate) on Mar 13, 2012 at 12:19 UTC | |
by Wizbiscuit (Initiate) on Mar 13, 2012 at 16:11 UTC |