This shouldn't be a problem. I am regularly working on machines that have more than one perl, and frequently where I don't have root. Which perl binary you get is dependent on the order of directories in $ENV{PATH}, so if you want the new perl, make sure it goes in PATH first.

The suplementary libraries that are part of perl are specific to your perl binary. If your perl is in /home/foo/perl5/bin, these will be in /home/foo/perl5/lib/... Note that these are set up at perl's build time and saved in Config.pm (usable by scripts that need to check that sort of thing). All installed modules are specific to the perl you are using. The other perl will have a different directory tree with a different set of modules. The same is true of extensions (XS modules); they live under the perl lib directory in an architecture specific directory.

When it comes to libraries for external code, these are searched for in $ENV{LD_LIBRARY_PATH}, which won't change if you switch which perl executable you are using.

Hope this helps

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)


In reply to Re: Two versions of perl in same machine by rinceWind
in thread Two versions of perl in same machine by kprasanna_79

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.