http://www.perlmonks.org?node_id=255897


in reply to Premature End of Script Headers Reasons?

It's almost always one of two things:

  1. The script dies before sending the Content-type
  2. Something gets printed to STDOUT before the Content-type

If there is another situation where this comes up, I've never seen it. Things printed to STDERR don't matter (unless you have a weird web server, in which case you have other problems).

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

  • Comment on Re: Premature End of Script Headers Reasons?