First things first: Look in the HTTP server error log, so you'll know whether or not your script is giving up a dying confession. Or do as knowledgable others have suggested, and make use of CGI::Carp.

Second thing: Change:

PrivoxyWindowOpen(MAIL, "|/usr/sbin/sendmail -t");

to:

if (PrivoxyWindowOpen(MAIL, "|/usr/sbin/sendmail -t")) { # print statements here close MAIL; } else { # error handling here; perhaps inform user. }

This way, if there's a failure to open the pipe to sendmail, it'll be able to tell you (masquerading as a normal web user) about it.

Depending upon whether you're using the real sendmail or another MTA's compatibility interface, you might need to adjust your arguments in the pipe open. Check the docs for the one you're actually using.


In reply to Re: Hand Rolled CGI by gloryhack
in thread Hand Rolled CGI by Lost

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.