I was using the Content-type: image/gif header. But the image is being displayed within an HTML page which uses the Content-type: text/HTML header.

When I create the image by accessing a CGI (i.e. <IMG SRC="test.cgi?blah&Blah">, the image comes out fine. But when I access the image using a sub routine (i.e. <IMG SRC="&test"> I get ASCII text.

I prefer to access via a sub routine because I am accessing a database with variables and the image is drawn using the variables. I am having trouble passing all the variables to an external CGI, but it is easy using a sub routine.

I'm sure my Perl ignorance is making this much more difficult than it should be.

You can see what i'm doing at http://www.belizeexplorer.com and using the search function at top. None of hte other links currently work.


In reply to Re: Re: deleting a file after loading by belize
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.