That all depends on your distro, and on how you plan to approach it.

In many ways, one ideal would be for you to upgrade perl via whatever your distro uses for updates. If you've never (or rarely) built anything from its source, the concept can be intimidating, and this method allows you to avoid doing it. However, even if you are adventurous, this method also has the advantage of upgrading your system perl in a way where everything should continue to work. You may have to upgrade things like cups or apache or anything else that uses perl, but you'll know you're getting yourself into a situation that is still supported, with all the added benefits and features (and bugfixes!) of newer perls.

On the other hand is the idea of compiling and installing your own private perl. By "private" I don't necessarily mean that it's not globally available on your machine, but that it's not maintained by your distro. It can be in ~/bin, or it can be in /usr/local/bin. But, whatever you do, do not install it to /usr/bin. That's because it will then overwrite the system perl that your distro depends on. They may have worked around bugs (or may even depend on them!), so you really don't want to touch it except via your distro-certified methods.

In this case, just download the source to the latest version and follow the instructions. It can take a while to configure, and then even longer to compile, but when you're done, hopefully you'll have two perls on the system - one for the system, and one for your applications and use.

Good luck!


In reply to Re: how to upgrade perl version by Tanktalus
in thread how to upgrade perl version by shanthiann

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.