If unlink fails then $! will be set. You could try printing the value in there.
You are in the wrong directory. You need to either chdir $maid_dir or prepend $maid_dir to the files that you are trying to delete.
You appear to be trying to delete $size rather than $f.
There is no need to quote the variable in your call to unlink.
In reply to Re: using unlink to delete files
by davorg
in thread using unlink to delete files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |