Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Issue with #!usr/bin/perl

by DrHyde (Prior)
on Mar 14, 2013 at 11:25 UTC ( #1023462=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Issue with #!usr/bin/perl
in thread Issue with #!usr/bin/perl

There's also this useful trick for writing perl scripts that will run using whatever is the first perl in the $PATH:

#!/bin/sh exec perl -x $0 #!perl # your perl code goes here

"But why not use #!/usr/bin/env perl?", I hear you cry.

Because env isn't always in /usr/bin - it's in /bin on some obscure platforms - and there can be "issues" with passing arguments to the executable via env.


Comment on Re^3: Issue with #!usr/bin/perl
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2015-05-05 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (112 votes), past polls