You still didn't post the source, or explain what you mean by "load it to directly to the page". It sounds like you are dumping the image directly into the html. The correct way to handle this is to output a HTML with has an IMG SRC="http://server.com/cgi-bin/picture-server.pl?picture=1" in it. picture-server.pl then loads the correct image and spits it out.

This is (presumeably) how the rotating perlmonks banner works - check the page, the html is layer src="http://206.170.14.74/~adfu/servfu.pl?l,perlmonks,5244" width=470 height=75

So your IMG SRC tag might look like: IMG SRC="http://server.com/cgi-bin/do-image.pl?image-params=blah"
then do-image.pl would be something like:

my $params=$query->params('image-params');
#Calculate image using params
print $query->header('image/gif');
#Now dump the image

The HTML will have to be constructed by another page that sets up the params correctly.

You may also screw with Apache to do what you want, but I'd rather club myself with the keyboard:

You can use the following apache config directives to acheive what you want
Action (provided by mod_action)
AddHandler/SetHandler (provided by mod_mime)
There appears to be a "PerlHandler" directive which allows you to stack handlers on a file. However it might be difficult to use, given the number of posts to bulletin boards about it.

I nearly forgot the most obvious: whack a big button on your output page that says "Click here when finished" and have it point to a script which deletes your file.

Update: OK, I just read your post above. Read the manual, in this case, Ovid's excellent CGI tutorial

____________________
Jeremy
I didn't believe in evil until I dated it.


In reply to Re: deleting a file after loading by jepri
in thread deleting a file after loading by belize

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.