J
jim jowski
I've written an html form that will pass three values to a script called
'something.pl' which lives in my cgi-bin directory. When something.pl
is executed; I get the following error message:
[Sun Apr 17 08:24:37 2005] [error] [client 127.0.0.1] malformed header
from script. Bad header=<html><head><title>the title</:
/var/www/cgi-bin/something.pl
'something.pl' is nothing more than:
#!/usr/bin/perl
$dollar0 = @ARGV[0];
$dollar1 = @ARGV[1];
$dollar2 = @ARGV[2];
print "<html><head><title>the title</title></head>";
print "<body><p>dollar0 = $dollar0\n";
print "<p>\tdollar1 = $dollar1\n";
print "<p>\t\tdollar2 = $dollar2\n";
print "</body></html>";
and the html form that calls 'something.pl' is:
<html><head><title>input</title></head>
<body><form method="post" action="/cgi-bin/something.pl">
<P>value 0: <input type="text" name="v0" size=10></p>
<P>value 1: <input type="text" name="v1" size=10></p>
<P>value 2: <input type="text" name="v2" size=10></p>
<P><input type="submit" name="submit" value="calculate"></P>
</form>
</body>
</html>
I know that I can do all this with PHP but I have too much time invested
in perl code that I can clone to migrate. Once I have this simple
output problem solved, I can hopefully do the rest of the project this week.
Thanks,
Jim
'something.pl' which lives in my cgi-bin directory. When something.pl
is executed; I get the following error message:
[Sun Apr 17 08:24:37 2005] [error] [client 127.0.0.1] malformed header
from script. Bad header=<html><head><title>the title</:
/var/www/cgi-bin/something.pl
'something.pl' is nothing more than:
#!/usr/bin/perl
$dollar0 = @ARGV[0];
$dollar1 = @ARGV[1];
$dollar2 = @ARGV[2];
print "<html><head><title>the title</title></head>";
print "<body><p>dollar0 = $dollar0\n";
print "<p>\tdollar1 = $dollar1\n";
print "<p>\t\tdollar2 = $dollar2\n";
print "</body></html>";
and the html form that calls 'something.pl' is:
<html><head><title>input</title></head>
<body><form method="post" action="/cgi-bin/something.pl">
<P>value 0: <input type="text" name="v0" size=10></p>
<P>value 1: <input type="text" name="v1" size=10></p>
<P>value 2: <input type="text" name="v2" size=10></p>
<P><input type="submit" name="submit" value="calculate"></P>
</form>
</body>
</html>
I know that I can do all this with PHP but I have too much time invested
in perl code that I can clone to migrate. Once I have this simple
output problem solved, I can hopefully do the rest of the project this week.
Thanks,
Jim