Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: /usr/bin/perl -w?

by chas (Priest)
on Jun 20, 2005 at 21:14 UTC ( #468492=note: print w/replies, xml ) Need Help??


in reply to /usr/bin/perl -w?

And with regard to ysth's reply, I once noted that if my shebang line was #!/usr/bin/perl followed by a carriage return (due to editing the script on a Windows machine and then transferring to Linux), the script exited with an error that the command was not found. (Putting -w at the end of the line fixed the problem, because then the carriage return was ignored as an unknown option, I think.) You can check if the return is there by editing the script in binary mode with vi(m) or emacs, etc.
chas

Replies are listed 'Best First'.
Re^2: /usr/bin/perl -w?
by jhourcle (Prior) on Jun 20, 2005 at 22:54 UTC
      Some people take the approach of creating a "/usr/bin/perl\r" link to /usr/bin/perl :)

        That works when you're root. It doesn't work when you're just an average user.

        Even as root on multi-user systems, I'd rather not give the users training wheels, as it teaches them to be sloppy, and to learn to do things wrong. (Like when I had to explain to someone that 'rm *' doesn't prompt you for which files to delete on every unix system... but the sysadmin on the system they learned had aliased 'rm' to 'rm -i')

      And Unix commands in general, too! Because of shell design and such, typing rm * in a directory which contains a file named -rf could delete everything (except the file -rf)! You should do rm -- * instead. I have actually been bitten by this once or twice, but luckily not by -rf but something more mundane.

        I've seen some people use this to their advantage too, by creating files called '-i' in directories containing things they don't want to lose. That way an inadvertant rm * will become interactive.


        We're not surrounded, we're in a target-rich environment!
Re^2: /usr/bin/perl -w?
by biochris (Beadle) on Jun 23, 2005 at 20:49 UTC
    Looks like it worked. thanks so much

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://468492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2023-01-29 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?