Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Premature end of script headers

by Anonymous Monk
on Apr 20, 2002 at 08:19 UTC ( #160754=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:


Still new to coding Perl and have now found that using 5.006 I get a lot more "Premature end of script headers" than before and/or scripts just not working, period.

Any suggestions on a quick list of common errros causing the above msg? And is v5.006 that much more stricter with correct code, than say, previous versions were?


Edit kudra, 2002-04-23 Changed title, added P tags

Comment on Premature end of script headers
Replies are listed 'Best First'.
Re: A cheat sheet.
by Biker (Priest) on Apr 20, 2002 at 08:42 UTC

    You can't correct an error without knowing the error. Read the logs and find out exactly what is going wrong in each specific case.

    • Do you have the -w (warnings) flag in each script?
    • Do you have the -T (Taint checking) flag in each script?
    • Do you use strict; in each script?
    • Do you use CGI; in each script?

    Generally speaking, Perl 5.6.x will let you do things that older versions of Perl did not. So it's more common to have problems when developing on a recent platform and executing under an older Perl. But that isn't the case here.

    If you have errors, you must drill down on each and every one to understand why you have them. Don't take it easy with errors on a Web site. Be serious about them. Understand them. Each and everyone of them. Only when you understand an error can you apply a sensible correction.
    Everything went worng, just as foreseen.

Re: A cheat sheet.
by Juerd (Abbot) on Apr 20, 2002 at 09:54 UTC


    It's 5.6, the 5.006 form that $] uses, is only for compatibility and numeric comparability (is that a word?). It's also 5.6.1 instead of 5.006001.

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://160754]
Approved by rob_au
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2015-11-29 20:51 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls