Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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

by tye (Sage)
on Dec 27, 2002 at 07:43 UTC ( #222495=note: print w/replies, xml ) Need Help??

in reply to shebang line - foreign to me

I'm with Larry on this one: #!/usr/bin/perl
People who don't bother to put a symbolic link in /usr/bin when they install Perl deserve to have to edit the scripts that they download.

(You likely have to move, rename, and chmod the script anyway. When I did lots of Unix stuff, I put shell scripts and Perl scripts in the src directory as this.SH and that.PL and had default install scripts that transformed this.SH into an executable "this" in the proper "bin" directory. The one for Perl scripts would have also fixed the #! line except that I always made sure I had a /usr/bin/perl symlink on all of my systems so I didn't have to.) (:

                - tye

Replies are listed 'Best First'.
Re: Re: shebang line - foreign to me (Larry says...)
by MarkM (Curate) on Dec 27, 2002 at 08:07 UTC

    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://222495]
[stevieb]: hmmm seems the C# library doesn't work right on win10. With berrybrew, only part of the perl portable zip is extracted. no errors nothing. Guess I have to look at switching out zip libraries. sigh

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-03-28 16:27 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (335 votes). Check out past polls.