Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Should options in the shebang line generally behave like switches given in the commandline?

by rubasov (Friar)
on Jan 29, 2010 at 17:02 UTC ( #820368=note: print w/ replies, xml ) Need Help??


in reply to Should options in the shebang line generally behave like switches given in the commandline?

Just a little advice regarding the portability of shebang lines:

Some (mainly ancient, but somewhere still living) Unices imposed serious limitations on the length of the shebang line (in characters) or on the processed number of the options (or option words). So it is considered good practice not to use relative paths, long commands and options/switches in the shebang line. IIRC I also read about cases where the amount of white space was relevant between the #! and the path. So my recommendation is to stick with this:

#! /usr/bin/perl
or this:
#! /usr/bin/env perl

If you move your options to in-code (eg. use warnings instead of perl -w) it also enhances readability.


Comment on Re: Should options in the shebang line generally behave like switches given in the commandline?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-10-26 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls