Re: Load-Bearing Warnings

Gaal Yahas <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
On Mon, Sep 13, 2004 at 10:53:55PM -0000, Smylers <[email protected]>
wrote:

> Somebody had edited that file on Windows then saved it on the FreeBSD
> server; the top line of the script was actually:
> 
>   #! /usr/bin/perl -w^M
> 
> where ^M indicates a carriage return character.  Removing the -w, and
> the space before the -w, therefore made it:
> 
>   #! /usr/bin/perl^M
> 
> except that I was editing this with 'Vim', which was clever enough to
> notice that this was a Dos-format file and so didn't display the ^M.
> 
> And that breaks things, cos perl^M isn't something that BSD can execute.

Of course it is something that BSD can execute. You just don't happen to
have an executable called perl^M in /usr/bin/. :)

Anyway, since most systems don't have it either, I almost always put -w
on the #! line even if my script is bound to run on 5.8, which supports
the warnings pragma, to exploit the behavior you encountered here. Looks
like I wasn't the only one.

-- 
Gaal Yahas <[email protected]>
http://gaal.livejournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.