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

belize has asked for the wisdom of the Perl Monks concerning the following question:

I have a program that generates an image, saves it to a file, then loads it on a page using the <IMG..> tag. i have tried to generate the image on the fly and load it directly to the page, but I only get ASCII text instead of the binary image.

My question is that i would like to delete the image AFTER it loads. I have tried the UNLINK function, but the image ends up being deleted prior to loading.

Is there a way to delete the file AFTER it has loaded?