XP is just a number | |
PerlMonks |
Re: CGI http header errorby arthas (Hermit) |
on Jun 03, 2003 at 13:04 UTC ( [id://262645]=note: print w/replies, xml ) | Need Help?? |
The script you posted doesn't send anything to the standard output, therefore you get an error when you browse it. Try the following variation:
This sends the HTML code both to out.html and to the standard output (that it to say, to the web browser). The HTTP header (print $q->header()) is needed when outputting to the standard output via CGI, but you can (and maybe you'd better) not send it to the file you create. The example above works this way: the header is only sent to the browser, and the HTML file is sent both to the browser and to the file. Michele.
In Section
Seekers of Perl Wisdom
|
|