I think you what to do this:
for my $f (@files) { if (-z "$maid_dir/$f") { unlink("$maid_dir/$f"); } }
Note that the -z file test returns true for zero-size files, and readdir gives you filename, but not the full path.
In reply to Re: using unlink to delete files
by scorpio17
in thread using unlink to delete files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |