The default perl version installed on my machine is 5.26.1. I found this out by using the following command:
perl -v
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
(with 71 registered patches, see perl -V for more detail)
Copyright 1987-2017, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
I installed the newest perl version from source using the following commands present on the link (https://www.cpan.org/src/):
wget https://www.cpan.org/src/5.0/perl-5.36.0.tar.gz
tar -xzf perl-5.36.0.tar.gz
cd perl-5.36.0
./Configure -des -Dprefix=$HOME/localperl
make
make test
make install
I tried changing the path to /usr/local/bin/
using the following command but it didn't work:
export PATH=$HOME/usr/local/bin/:$PATH
On checking the perl version using perl -v
, I am still getting perl 5.26.0 as the installed version.
How can I make perl 5.36.0 as my default version?
I am new to Linux. Any help is appreciated.