Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Running Perl Scripts

by tcf22 (Priest)
on Nov 06, 2003 at 03:30 UTC ( [id://304941]=note: print w/replies, xml ) Need Help??


in reply to Running Perl Scripts

A blank line("\n\n") is required to signal the end of your headers.

print "Content-type:text/html\n\n"; should fix the issue in this script. When you get into more complicated CGIs dealing with cookies, expirations and such, you only put the blank line at the end of all headers.
print "header1:value1\n"; print "header2:value2\n"; print "header3:value3\n\n";
You may also want to consider using CGI methods to output you headers and html. I personally prefer HTML::Template, but either will work.

- Tom

Replies are listed 'Best First'.
Re: Re: Running Perl Scripts
by Roger (Parson) on Nov 06, 2003 at 03:37 UTC
    Ummm, I think his immediate problem isn't the misformatted content type header, but rather with the -T option in the #! line of the perl script.

    When the -T option is removed, then the content type header problem will show up.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-03-19 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found