Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: /usr/bin/perl -w?

by jhourcle (Prior)
on Jun 20, 2005 at 22:54 UTC ( #468506=note: print w/replies, xml ) Need Help??


in reply to Re: /usr/bin/perl -w?
in thread /usr/bin/perl -w?

For this very reason, I recommend that you end the shebang line with --.

Replies are listed 'Best First'.
Re^3: /usr/bin/perl -w?
by ysth (Canon) on Jun 20, 2005 at 23:00 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')

Re^3: /usr/bin/perl -w?
by kaif (Friar) on Jun 21, 2005 at 06:20 UTC

    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!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2023-01-30 05:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?