Hi all,
I have been away from PERL for a while (so I am pretty sure I am doing something stupid) and I have a short script:
This is what I am getting in my error log:
At this point alll I want is for the var to print but I can't seem to get it to even do that without giving me a 500.....
Any suggestions are appreciated.
Jim
I have been away from PERL for a while (so I am pretty sure I am doing something stupid) and I have a short script:
Code:
#!/usr/bin/perl
use Digest::MD5 qw(md5_hex);
use DB_File;
use CGI qw(standard carp);
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<BODY>\n";
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
print "$FORM{$name} = $value;\n";
}
print "$FORM{'userName') " + ' : ' + " $FORM{'password')\n";
This is what I am getting in my error log:
Code:
[Tue Aug 22 22:39:06 2006] [error] [client 127.0.0.1] syntax error at /var/[URL unfurl="true"]www/htdocs/cgi-bin/addUser.pl[/URL] line 24, near "'userName') ", referer: [URL unfurl="true"]http://localhost/addNew.html[/URL]
[Tue Aug 22 22:39:06 2006] [error] [client 127.0.0.1] Missing right curly or square bracket at /var/[URL unfurl="true"]www/htdocs/cgi-bin/addUser.pl[/URL] line 24, within string, referer: [URL unfurl="true"]http://localhost/addNew.html[/URL]
[Tue Aug 22 22:39:06 2006] [error] [client 127.0.0.1] Execution of /var/[URL unfurl="true"]www/htdocs/cgi-bin/addUser.pl[/URL] aborted due to compilation errors., referer: [URL unfurl="true"]http://localhost/addNew.html[/URL]
[Tue Aug 22 22:39:06 2006] [error] [client 127.0.0.1] Premature end of script headers: addUser.pl, referer: [URL unfurl="true"]http://localhost/addNew.html[/URL]
At this point alll I want is for the var to print but I can't seem to get it to even do that without giving me a 500.....
Any suggestions are appreciated.
Jim