CGI Perl script is printing the HTML (along with 'content-type: text/html') string to the browser ra

Posted by Wikidkaka on Stack Overflow See other posts from Stack Overflow or by Wikidkaka
Published on 2010-04-12T10:03:26Z Indexed on 2010/04/12 10:13 UTC
Read the original article Hit count: 430

Filed under:
|

I have a perl CGI script that needs to send back some HTML

print qq^Content-type: text/html\n\n
<HTML>
<HEAD>
<TITLE>some title</TITLE>
...
...
...
...
^:

Instead of seeing the rendered HTML in the browser, I see the entire HTML along with the tags and the 'content-type' line in plain text. Below is how things look in the browser -

Content-type: text/html


    <HTML>
    <HEAD>
    <TITLE>some title</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" BACKGROUND="" onLoad=document.forms[0].elements[0].focus();>

© Stack Overflow or respective owner

Related posts about perl

Related posts about cgi