in reply to Re: Yet Another Premature End of Script Headers Question
in thread Yet Another Premature End of Script Headers Question
Don't confuse CGI output with network output. The CGI script's output is going to be fixed up by apache before it hits the network. The web server will take care of line endings and extra header information.
For a simple script such as this one, you don't need CGI. You could use a heredoc though. :)
#!/usr/bin/perl print <<"CGI"; Content-type: text/html <html> <head><title>CGI test</title></head> <body> <H2>Hello, world.</H2> </body> CGI
|
|---|