in reply to a classic : 'Premature end of script headers' problem

You could try adding BEGIN { print "Content-Type: text/plain\n\n" } after the shebang (#!) line to see what the server is seeing.

Replies are listed 'Best First'.
Re^2: a classic : 'Premature end of script headers' problem
by hmbscully (Scribe) on Sep 19, 2007 at 18:37 UTC
    Where would I see what the server is seeing?
    I added that line and I saw no difference, either in the output or in the error logs.


    I learn more and more about less and less until eventually I know everything about nothing.
Re^2: a classic : 'Premature end of script headers' problem (flush)
by tye (Sage) on Sep 20, 2007 at 03:50 UTC

    Make that BEGIN { $|= 1; print "Content-Type: text/plain\r\n\r\n"; }, the $|= 1 part being important, the \r's likely not important (that part of the RFC is rarely a sticking point, thankfully).

    - tye