Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2018-03-25 06:13 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (300 votes). Check out past polls.