in reply to using unlink to delete files

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.

--

See the Copyright notice on my home node.

Perl training courses