Hello All I am having problems with the wrong content-type being sent in the HTTP Header as "Content-Type: text/plain". I have tried various different sample scripts such the hellworld one listed below:

#!/usr/local/bin/perl # hello.pl -- my first perl script! print "Content-type: text/html\n\n"; print "Hello, world!\n";
When i preview the script in a browser I can see that the content-type is being added to the body of the page. I have pasted the packet capatured
HTTP/1.1 200 OK Date: Thu, 15 Dec 2011 14:42:52 GMT Server: Apache/2.2.3 (CentOS) Connection: close Transfer-Encoding: chunked Content-Type: text/plain --------- HTTP Content Content-type: text/html Hello, world! ---------- HTTP Content
I think this is probabily a configuration settings gone wrong, I am using perl v5.8.8 on Centos 5 with mod_perl. I am also trying to use the rss2cicsco script (found here http://dontpokebadgers.com/RSS2Cisco/) and getting the same results with each page having the content-type being added to the body of the http packet. THanks for any help James

In reply to Perl keeps sending wrong content-type by jam3s

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.