KingofSnake
Programmer
Someone help me out here.
This works just fine:
-----------------------------
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head><title>Test Page</title></head>\n";
print "<body>\n";
print "<h2>Hello, world!</h2>\n";
print "</body></html>\n";
But this doesn't:
-----------------------------
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndOfHTML;
<html><head><title>Test Page</title></head>
<body>
<h2>Goodbye, Cruel WORLD!</h2>
</body></html>
EndOfHTML
----------------------------
I don't understand it. This should work, shouldn't it? When running it through a perl exe, I get the following message:
"Can't find string terminator "EndOfHTML" anywhere before EOF at c:\first.cgi line 5"
When I run it on my website, I get a 500 Internal Server Error. What's going on?
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
This works just fine:
-----------------------------
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head><title>Test Page</title></head>\n";
print "<body>\n";
print "<h2>Hello, world!</h2>\n";
print "</body></html>\n";
But this doesn't:
-----------------------------
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndOfHTML;
<html><head><title>Test Page</title></head>
<body>
<h2>Goodbye, Cruel WORLD!</h2>
</body></html>
EndOfHTML
----------------------------
I don't understand it. This should work, shouldn't it? When running it through a perl exe, I get the following message:
"Can't find string terminator "EndOfHTML" anywhere before EOF at c:\first.cgi line 5"
When I run it on my website, I get a 500 Internal Server Error. What's going on?
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)