You seem to be a bit confused about how all the parts fit together. Your code is really CGI.pm perl pidgin HTML.
The plain old HTML would look something more like:
<FORM METHOD="POST" ACTION="foo.cgi">
<INPUT TYPE="text" NAME="foo"><P>
<INPUT TYPE="text" NAME="bar">
The HTML could either be generated by a script or reside in a static file somwhere.
Here's some code that prints a form and any results of previous submits. I didn't list a form action, becuase it defaults to the page it reside in.
my $q = new CGI;
$q->h1('Print some input.'),
# Print w/ space
print $q->param('foo').' '.$q->param('bar'); # You can't use "" to in
+terpolate param(), it's a function call, not a variable.
# Print w/o space
TGI says moo
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.