You haven't really given me much to go on, so I can't tell you how to fix it, but I can tell you how you might start going about debugging it... Try invoking your cgi script from the command line, manually feeding it values, and looking at all the stuff that comes back, HTTP headers included. To do this, you'll want to instantiate a CGI object with a file handle to a file that contains field value pairs, or with STDIN and type in the values when you run the script.

use CGI; open(FILE, "<data.txt") or die "gah!"; my $query = CGI->new(FILE);

Where data.txt contains stuff like...

foo=bar baz=biz

This cuts your web server and the browser out of the loop, isolating your debugging just to your script. Make sure that your HTTP headers are coming out looking alright, specifically checking to see that your headers and HTML body are separated by a blank line.


In reply to Re: Malformed HTML output by skyknight
in thread Malformed HTML output by simX

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.