I have been trying to delete a file using a script and it is refusing to go. (I have very little experience of Perl). One script creates the temporary file (empty) and later another is to delete it.
The url passes a parameter to the script:
e.g. dfile.pl?f=abcde
The filename f obviously varies.
In the script:
refuses to delete the file (e.g. abcde). When I manually enter:
unlink("../../alpha/tempf/abcde"); it goes. (It has nothing to do with file permissions).
Also I can test if the file exists, using the variable, -e $fnmi and I get true.
I would be very grateful if someone could suggest what the problem is here!
The url passes a parameter to the script:
e.g. dfile.pl?f=abcde
The filename f obviously varies.
In the script:
Perl:
$thef=param('f');
$ful="../../alpha/tempf/".$thef;
unlink($ful);
refuses to delete the file (e.g. abcde). When I manually enter:
unlink("../../alpha/tempf/abcde"); it goes. (It has nothing to do with file permissions).
Also I can test if the file exists, using the variable, -e $fnmi and I get true.
I would be very grateful if someone could suggest what the problem is here!