Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: CGI http header errorby Tanalis (Curate) |
on Jun 03, 2003 at 12:58 UTC ( [id://262643]=note: print w/replies, xml ) | Need Help?? |
Hi,
The script excerpt you've provided there isn't actually outputting anything to the browser (you're printing everything to the OUT filehandle) - which is why you'll get the incomplete header message. You can fix this by outputting the same data to STDOUT, as well as to the file (anything written to STDOUT is directed automatically to the browser when the script is run). As far as the HTML file goes, that looks about right for a full set of headers and your "Hello, world". You can always add in some newlines when you're outputting to the file (eg print OUT $q->header, "\n";) to space the code out a little. Hope that helps. -- Foxcub
In Section
Seekers of Perl Wisdom
|
|