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.

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 imbibing at the Monastery: (4)
As of 2016-09-25 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (470 votes). Check out past polls.