Click to See Complete Forum and Search --> : Killing files


doness
03-15-2003, 03:16 PM
I cannot made head or tail of the kill function - I have tried kill ($filename); and varieties of it, but the file remains on the system (actually in the cgi-bin - is this the reason why it does not delete?).

Thanks to all in advance

Don

Nedals
03-15-2003, 04:14 PM
Try.. unlink("$filename"); to delete a file.

Nedals
03-15-2003, 04:18 PM
Try.. unlink("$path/$filename"); to delete a file.

DOUBLE POST:
It said wait 60 sec before posting. What it didn't say was my post would go up anyway. MOST :o

doness
03-20-2003, 01:26 PM
Originally posted by nedals
Try.. unlink("$filename"); to delete a file.

Thanks very much for your response - I will try this - my perl book does not give this instruction (or any other!)

Nedals
03-20-2003, 05:29 PM
Pick up a copy of..

O'Reilly's Perl 5 pocket reference

It's a small reference book of the majority of the Perl instructions and it's only $7.00 in the US. You need to know some Perl, or other programming language, to get the most out of it.