Is there somewhere specific where I should install it?
It does not really matter much, I usually install it as my normal user (not as root) to my home-directory (a subdir of my home that is).

Presumbly I then have to change the line at the top of my perl scripts from #!/usr/bin/perl to this new path?
Yes, that's right and you should also set the PATH-enviroment variable (or whatever your shell uses as search-path) up in such a way that your "new" perl is found before the "old", so that you can simply type "perl" on your command prompt and get the new one.

how will CPAN know to put these in my new perl installation path and not the system perl?
On installation perl remembers where it is installed and so knows where to install modules (just don't mess with the defaults during installation).

You later then only have to run the proper perl and everything will be sorted (i.e. wether you run it via perl -MCPAN -e shell or simply via cpan you just have to make sure that your shell is picking up the newly installed perl/cpan).


In reply to Re^3: path to perl on umbuntu by morgon
in thread path to perl on umbuntu by Anonymous Monk

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.