galton
07-21-2000, 03:21 PM
My Perl scripts run from the command line, but when called with a URL, fail with the message premature end of script headers.
URL: cgi.dreamscape.com/galton/cgi-bin/environment.cgi
I left this simple script in the directory to simplify troubleshooting.
#/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head><title>Environment Display</title>";
print "</head><body>";
print "<h1>Environment Variables</h1>";
print "The following variables are present in the current environment:";
print "<ul>";
while (($key, $value) = each %ENV) {
print "<li>$key = $value\n";
}
print "</ul>";
print "End of environment";
print "</body></html>";
What's happening here?
Thank you,
URL: cgi.dreamscape.com/galton/cgi-bin/environment.cgi
I left this simple script in the directory to simplify troubleshooting.
#/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head><title>Environment Display</title>";
print "</head><body>";
print "<h1>Environment Variables</h1>";
print "The following variables are present in the current environment:";
print "<ul>";
while (($key, $value) = each %ENV) {
print "<li>$key = $value\n";
}
print "</ul>";
print "End of environment";
print "</body></html>";
What's happening here?
Thank you,