This is a small aside, but the path c:program files suggests that your running on a Windowds box. Apache on Windows by default needs a shebang line as if it were on Unix. So if your copy of Perl is in c:\Perl, the first line should read: #!c:/perl/bin/perl

Now if Apache has been configure to use the registry hack then please ignore this comment, as Apache will not care what the shebang line is.

The other comments here are fine, if Apache doesn't get the two carriage returns between the HTTP headers and the body content it will die on you.

If you are new to Perl be warned that Perl/CGI while fun, is like learning to drive on the Autobahn, you may find an empty country lane somewhat safer.

You should look at the O'Reilly's Rat Book, and have a look at Lincon Stein's CGI module, it will take a lot of pain out of CGI for you. Check out the Book Reviews section, you will see that there are quite a few books to AVOID!


In reply to Re: Malformed Header? by ajt
in thread Malformed Header? by tretin@school

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.