If you are going to print your own headers to mod_perl then you must
send the OK response header first like so :
print qq(HTTP/1.1 200 OK\n) ;
print qq(Content-Type: text/html\n\n);
If you do not mod_perl says 'Hey, I did not get a valid header!' and
goes about printing its own before it even looks at what you are
outputting.
I generally use CGI.pm and its $q->header method which solves the
problem in one easy line.
John-
>Hi,
>
> I'm having problems with headers. I know there is tons of stuff about
>headers in the archives but none that I could find matches my situation.
>
> I have one script blah.cgi
>
> use strict;
>
> print qq(Content-Type: text/html\n\n);
--------------------------------------------------------------------
With Perl your free to do The Right Thing, howver you care to define it.
- Larry Wall , Programming Perl - 2nd Edition