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 ]
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||