love2code love2code - 2 months ago 5x
Perl Question

How to set correct perl path

I have 2 versions of perl installed. perl v5.18.2 and v5.20.0 . But when I do

perl -v
I get perl v5.18.2. I don't need v5.18.2 at all. I need v5.20.0. How do I change the path to include v5.20.0 and not v5.18.2?

Here is my


v5.18.2 is installed at
, and v5.20.0 at


See the perlbrew documentation:

switch Permanently use the specified perl as default

perlbrew switch perl-5.20.0

If you haven't already, you will need to add source /root/perl5/perlbrew/etc/bashrc to your login script for this to work.