Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: On debugging "Premature End of Script" errors

by halley (Prior)
on May 06, 2003 at 17:23 UTC ( #255955=note: print w/ replies, xml ) Need Help??

in reply to On debugging "Premature End of Script" errors
in thread Premature End of Script Headers Reasons?

Though the questioner said 'intermittent,' I'll also add the tip to make sure your script isn't using inconsistent line endings. A DOS-style \x0D\x0A at the end of the shebang line tends to confuse some Unix and Linux kernels. Perl doesn't mind but the kernels do.

Try running (dos2unix) on the script file, or the equivalent (perl -pie 's/\x0D//g' file).

Many editors often hide this problem *unless* the line endings are mixed within the same file: they figure you know what you're doing, or you don't know what line ending differences are.

[ e d @ h a l l e y . c c ]

Comment on Re: On debugging "Premature End of Script" errors

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://255955]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2015-11-26 03:32 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 (696 votes), past polls