Before we start this session and start writing some PERL scripting, we should aware of various platform which support PERL or We could install Perl on various platforms like Unix/Linux/Windows,Mac, Salaris, BSD, Debian/Ubuntu etc.
Mostly we would work here on Linux/Unix setup. Let’s start with Perl Installation on Unix/Linux Machines.
Installation of Ubuntu
First i hope Perl is installed by default on any Linux/Unix machine. But if not then follow below commands
##Perl installation on Linux## # yum install perl -y ##Perl Installation on Ubuntu## # apt-get install perl -y
Once you install Perl on your machine, you can check it like below.
root@jarvis:~# perl -v This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi (with 60 registered patches, see perl -V for more detail) Copyright 1987-2015, 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.
In case you don’t like to install default Perl present OS repository, then you can also download Perl from its website “https://www.perl.org/get.html”
Here you will get bundle source that you have to compile on your machine and install in below mentioned way.
$tar -xzf perl-5.x.y.tar.gz $cd perl-5.x.y $./Configure -de $make $make test $make install