Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Moving perl from one directory to another.

by gurusrin (Initiate)
on Jun 11, 2015 at 06:59 UTC ( #1129980=perlquestion: print w/replies, xml ) Need Help??

gurusrin has asked for the wisdom of the Perl Monks concerning the following question:


I have been tasked to move perl binary (along with all the library files) to a different location without doing any compilation. Note that the new location would be on NFS. Is it possible to do such a move?

I understand that the locations of the libraries that are provided during the compilation cannot be changed. Correct me if I am wrong.

Thank you.
  • Comment on Moving perl from one directory to another.

Replies are listed 'Best First'.
Re: Moving perl from one directory to another.
by dave_the_m (Monsignor) on Jun 11, 2015 at 08:03 UTC
    The default location of perl's library files are usually hard-coded into the perl binary at compile time, but can be changed at run time via the PERL5LIB environment var, the -I perl command line switch, or 'use lib' within a script, for example.


      Thank you Dave.

      I will try out this. The only problem is that the change might have to be done in lots of files.

        Not necessarily. You should be able to export the appropriate environment variables in the shell startup script or somewhere simillar (I don't know AIX, so I can't give an accurate suggestion on that).
Re: Moving perl from one directory to another.
by Anonymous Monk on Jun 11, 2015 at 07:53 UTC

      I have to do it on AIX and I don't have the option to compile it.

      Regards, Srinivasan
Re: Moving perl from one directory to another.
by jfroebe (Parson) on Jun 11, 2015 at 14:08 UTC

    This sounds like the need for symbolic links. Move the Perl installation wherever you want and use the symbolic link to point from the old location to the new. No need for messing with environment variables or recompiling Perl.

    Jason L. Froebe

    Tech Blog

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1129980]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2021-10-24 12:15 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.