http://www.perlmonks.org?node_id=419002


in reply to Perl/Cgi : how to delete file after leaving original myscript.cgi?

One way would be to send a request to myscript3.pl?file2delete=nnn (for example) to delete the nnn file.
It can be done using JavaScript like in OnBlur or OnClose methods.
Anyway the user may not allow you to open a new window, delete the file and then close the window, so I agree that
the unique way to be sure you can delete the file is to put a process that will delete the files created based on last access time, for example.
  • Comment on Re: Perl/Cgi : how to delete file after leaving original myscript.cgi?