G'day nrabus,

Welcome to the Monastery.

From your description, it sounds like the problem lies with you web server configuration. I don't know what you're using but I'll take a guess at Apache. You need to specify in your configuration file — possibly named httpd.conf — that the cgi-bin directory has Perl code which the web server should execute. I can't tell you exactly what the configuration code would be; however, it might look something like:

<Directory "/cgi-bin"> SetHandler cgi-script Options +ExecCGI </Directory>

There's quite possibly other directives you'll need. I'm not really comfortable guessing any further.

If it is Apache, the default httpd.conf provides some clues. Get details from "Apache HTTP Server Version 2.4 Documentation"; although, you may need a different version. See the "Directive Index" for links to the documentation for individual directives.

I only briefly looked at your code. You generally seem to be on the right track. You've got a semicolon where you probably should have a comma after the "Last name:" part; alternatively, add another print after it (i.e. just before the "Gender:" part).

You also might like to consult the "CGI" and "CGI::HTML::Functions" documentation.

— Ken


In reply to Re: Perl code doesn't echo form data by kcott
in thread Perl code doesn't echo form data by nrabus

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.