Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2016-10-25 08:55 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.