Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-08-31 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls