note
jhourcle
<p>The issue is with line endings, but most likely not why you think.</p>
<p>In the first line of the file, you'll have:</p>
<blockquote><tt>#!/usr/bin/perl</tt></blockquote>
<p>or the equivalent.</p>
<p>If you transfer between a windows PC and a UNIX box, you end up with:</p>
<blockquote><tt>#!/usr/bin/perl^M</tt></blockquote>
<p>So, when you go to execute the script, it looks for '<tt>perl^M</tt>' to execute, which it can't find. When you're dealing with CGIs, this can be a real problem to debug, as you'll get 'file not found' type error message which confuses people.</p>
<p>Just to be safe, I recommend using the shebang line of:</p>
<blockquote><tt>#!/usr/bin/perl --</tt></blockquote>
<p>Typically, you can get away with bad line endings for most scripts this way, but I'm guessing '<tt><<EOF</tt>' type declarations would be a problem, as would pod.</p>
373466
373466