http://www.perlmonks.org?node_id=467218


in reply to delete a file

you do not have the file on the system or you
are trying to delete file which you can not delete
because of file permisions, or you execute your
script from some other directory than ../data/.
# mkdir dir
# touch dir/file
# ls dir/
file
# perl -e 'unlink "dir/file" or die "failure\n";'
# ls dir/
#