Before anyone rips me for not using CGI, I want to let it be known
that I am unable to use CGI for this application due to the
server I will be using it on. I am using CGI::CARP on the
server I am testing it on to try to find my problems.
I am trying to Post some information to the CGI, but I get
a software error. It appears if I am not reading the Post
correctly.
The form is located
stuffy's form
and the code is below
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
read (STDIN,my($temp), $ENV{'CONTENT_LENGTH'});
my (@pairs) =split(/&/,$temp);
my($item) = "";
foreach $item(@pairs) {
my($key,$content) =split (/=/, $item, 2);
$content=~tr/+/ /;
$content=~s/%(..)/pack("c",hex($1))/ge;
my($fields{$key})=$content;
}
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>This is a test of the stuffy perl network</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "$fields{tool}\n";
print "$fields{month}\n";
print "$fields{date}, $fields{month}\n";
print "</BODY>\n</HTML>";
If my link did not work here is the url:
http://www.slpproductions.com/prob.html
I'm sure this is an easy problem, just something I'm overlooking.
If so, please go easy on me, I'm a newbie.
Stuffy
-
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>
<u> <ul>
-
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
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.