Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: how to run perl file in linux

by CountZero (Bishop)
on May 13, 2014 at 13:55 UTC ( [id://1085904]=note: print w/replies, xml ) Need Help??


in reply to Re: how to run perl file in linux
in thread how to run perl file in linux

Of course, #!/usr/bin/perl will most likely run your system Perl, which may or may not be what you want. It is a good advice to install your "own" Perl in your home directory. Then you can install new modules and upgrade Perl without risking to break your system. Of course, the shebang should reflect the path to your own new Perl.

If you find that this is all too difficult to manage, think about using perlbrew.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^3: how to run perl file in linux
by kevbot (Vicar) on May 14, 2014 at 04:27 UTC
    CountZero brings up a good point. This issue is why I like to use
    #!/usr/bin/env perl
    as the shebang, when I am on a linux or Mac OS X system. This way, it will run the script using the first perl found in your path. This node contains some more discussion on the topic: /usr/bin/env perl - query

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found