Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: shebang line - foreign to me (Larry says...)

by MarkM (Curate)
on Dec 27, 2002 at 08:07 UTC ( #222496=note: print w/ replies, xml ) Need Help??


in reply to Re: shebang line - foreign to me (Larry says...)
in thread shebang line - foreign to me

The exception to this is that many products require a specific version of Perl. In this case, /usr/bin/perl is not enough.

However -- since the people with these requirements should be dealing with the ensuing problems via another route, I too have chosen to use #!/usr/bin/perl in all scripts in our product as a matter of good form. #! is just not ever used at this point in time.

The "#!/usr/bin/env perl" route (mentioned by somebody else) is another solution that is heavily used by installations that mount perl (or TCL, or ...) over the network, where the perl in the PATH is a /bin/sh script that automatically executes a platform-specific version of perl. Most UNIX installations do not allow "#!/path/to/executable" where /path/to/executable is a script itself. In many cases the #! line then takes the form "#!/usr/bin/env /network/path/to/perl/script". Note that UNIX operating systems also have different limits regarding the length of the #! line, sometimes as low as 31 characters in total.


Comment on Re: Re: shebang line - foreign to me (Larry says...)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (16)
As of 2014-12-22 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (118 votes), past polls