[Chicago-talk] Perl script cannot find itself?

tiger peng tigerpeng2001 at yahoo.com
Fri Jun 17 05:53:30 PDT 2011

I checked them with vi's list command, there is no cartridge return character in the scripts.

From: Andrew Rodland <andrew at cleverdomain.org>
To: Chicago.pm chatter <chicago-talk at pm.org>
Sent: Thursday, June 16, 2011 9:19 PM
Subject: Re: [Chicago-talk] Perl script cannot find itself?

On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote:
> There are two Perl scripts only different by the first line. Why the one
> without -w in the #! line cannot find itself but the own with -w can?

Because you saved the file with windows line-endings, and there's a \cM at the 
end of every line. In the first case, the kernel is looking for 
"/usr/local/bin/perl\cM" and can't find it. In the second case the kernel is 
looking for "/usr/local/bin/perl" and running it with an argument of "-w\cM", 
which is harmless.
Chicago-talk mailing list
Chicago-talk at pm.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20110617/7b60d4c2/attachment.html>

More information about the Chicago-talk mailing list