in reply to Re^2: Deleting a File
in thread Deleting a File

Oh yes, you need to specify the directory path:
unlink "$dirpath/$filename" or die "can't unlink $dirpath/$filename: $ +!";
And use the "$!" part since that will give you the file-system error.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.