laziness, impatience, and hubris | |
PerlMonks |
Re: On debugging "Premature End of Script" errorsby halley (Prior) |
on May 06, 2003 at 17:23 UTC ( [id://255955]=note: print w/replies, xml ) | Need Help?? |
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. --
In Section
Seekers of Perl Wisdom
|
|