|Perl: the Markov chain saw|
cgi download and delete fileby teddyttas (Novice)
|on Aug 15, 2013 at 09:19 UTC||Need Help??|
teddyttas has asked for the
wisdom of the Perl Monks concerning the following question:
I would like to have your advice on the following problem:
I am making a small webapp and my purpose is to create a number of text files, compress them, download as zip file and erase.
For the moment I've been able to create the directory with the file, put them in a zip file and to download, but I can't erase the zip file. Well..It's not totally true. The problem is that if I do it, it compromises the download. My question would then be : Ho can I postpone the file elimination or, how can I check that the file has been totally completed before I erase it?
I know about the existence of File::Temp, but as I need this zip file just once, I think it would be simpler to just delete it. Here is a part of the code
I thank you from now for your help