Mailing List Archive

Unlink function
I cannot get the unlink function to delete files in NTPERL 5.001. The
code executes and there are files that meet the condition. I have full
access rights to the NT Web server directory the files reside in and have
been able to open, read, create, and write files. While testing, I am
executing the script from my local NT PC rather than the Web server.

# If date_closed is less than or equal to today's date delete the file
if ($date_closed <= $today) {
print ("date_closed = \"$date_closed\" \n");
print ("filename = \"$filename\" \n");
@delete[0] = $filename;
print ("@delete[0] \n");
$num_files = unlink (@delete);
print ("number of files deleted = \"$num_files\" \n");
} #end if