Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: CGI http header error

by Tanalis (Curate)
on Jun 03, 2003 at 12:58 UTC ( [id://262643]=note: print w/replies, xml ) Need Help??


in reply to CGI http header error

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
#include www.liquidfusion.org.uk

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://262643]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found