Gossamer Forum
Home : General : Perl Programming :

Script requiring hard return to generate HTML?

Quote Reply
Script requiring hard return to generate HTML?
Stuck a Perl Script on w2000 server and noticed something different.

example..

Code:
print qq|<HTML><HEAD><TITLE>blah blah blah...

<P> Here's your stuff
will generate a "text" page in the browser starting with <P>Here's your stuff - and will show all of the tags as if it was a text file.

Now...

Code:
print qq|

<HTML><HEAD><TITLE>blah blah blah...

<P> Here's your stuff

will generate a "proper" html page.

There has to be a "hard return" between the print delimiter and the <HTML> tag in order for it display as a web page.

Is this common?
Quote Reply
Re: [Watts] Script requiring hard return to generate HTML? In reply to
Probably happening because you're not printing the content-type header.

Adrian