On Sat, 27 Jul 2002 22:38:23 +0300, [EMAIL PROTECTED] (Octavian Rasnita) wrote:
>It is that script for downloading a file then delete it from the server. > >I've tried putting the "unlink $file" line in an END { ... } but this block >it is not executed if the download is cancelled. > >Do you have any idea if I have any solution to make it work? I tested it on linux apache with mozilla. It unlinks the file if the user cancels the download. If you have people killing their browser, without cancelling the download, you may get some files left. Why don't you write the names of the files, and their start-download times to a file, then every hour run a script which cleans up files which didn't get deleted, if their start-download time is older than 10 minutes. >until (eof FH) { >read (FH, my $buf, 1); >print $buf; >} Why use read with such a small block size? This works: while (<FH>){print} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]