Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 chanting in the Monastery: (10)
As of 2014-12-28 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (182 votes), past polls