Dec 12, 2000, 2:50 PM
Post #1 of 1
How Do I delete A File?
If the file is located in another directory than the one your script is executing from, then simply specify the full path before the file's name.
To check and see if this code fails, use this
unlink "file.txt" or die "Couldn't Delete File because: $!";
Instead of die you can use print to actually print the message to the screen, when you execute your code through a browser this will help more than die, but the script will continue executing.