Perl environment set up
Before we start learning the Perl language, we need to install Perl's execution environment first.
Perl can run on the following platforms:
- Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX etc.)
- Win 9x/NT/2000/
- Macintosh (PPC, 68K)
- Solaris (x86, SPARC)
- Alpha (7.2 and later)
- Debian GNU/kFreeBSD
- MirOS BSD
Perl is installed by default on many system platforms. We can check if it is installed by the following command:
$ perl -v This is Perl five, demonstrate 18, disruption 2 (v5.18.2) developed for< Span class="pln"> darwin-thread-multi-2level (with 2registered patches, see perl -V for more noteworthy element< Span class="pun">) Copyright 1987 - 2013, Larry Wall ...
If the above data demonstrates that it has been set up, on the off chance that it isn't now settled, you can see the accompanying establishment guidelines.
We can download the establishment bundle bargain for the comparing stage on Perl's site: https://Www.Perl.Org/get.Html
Unix and Linux Install Perl
Perl set up ventures on Unix/Linux frameworks are as follows:
Download the supply pack for Unix/Linux.
Do the ensuing subsequent to downloading the perl-five.X.Y.Tar.Gz report.
$ tar -xzf perl -5.X.y.tar.gz $ disc perl-five.X.y $ ./Configure -de $ make $ make test $ make install
Next we can investigate if the set up is a triumph if the perl - v order.
After the set up is a hit, the establishment way of Perl is /usr/neighborhood/bin , the library is introduced in /usr/nearby/lib/perlXX, and XX is the model range.
Window Install Perl
Perl has ActiveStatePerl and Strawberry Perl compilers at the Window stage.
The biggest refinement among ActiveState Perl and Strawberry Perl is that Strawberry Perl contains more modules in CPAN, so Strawberry Perl downloads in excess of 80 M reports, while ActiveState Perl best has roughly 20M.
We utilized Strawberry Perl here.
The Perl set up ventures on the Window framework are as follows:
Strawberry set up pack hyperlink: http://strawberryperl.Com.
Download the model in your machine: 32bit or 64bit.
After downloading, double tap on to open it and pursue the establishment wizard to introduce it gradually.
Mac OS establishment Perl
Mac OS frameworks for the most part have Perl introduced by utilizing default. On the off chance that never again introduced, complete the accompanying steps:
Download the supply bundle bargain for Mac OS.
Do the accompanying subsequent to downloading the perl-five.X.Y.Tar.Gz report.
$ tar -xzf perl -5.X.y.tar.gz $ album perl-5.X.y $ ./Configure -de $ make $ make test $ make install
After the execution is fruitful, the set up course of Perl is /usr/adjacent/bin , the library is mounted in /usr/close-by/lib/perlXX, and XX is the rendition amount.
Perl has a particular execution.
We can execute perl code quickly on the direction line. The sentence structure is as follows:
$perl -e <perl code> # Unix/Linux or C:>perl -e <perl code> # Windows/DOS
Command line parameters are as follows:
|-d[:debugger]||Run the program in troubleshoot mode|
|-Idirectory||Specify the @INC/#consist of directory|
Allow contamination detection
|-t||Allow poisons warning|
|-U||Allow dangerous operation|
|-w||Allows numerous helpful warnings|
|-W||Allow all warnings|
|-e program||Execute perl code|
|record||Execute the perl content document|
2, content execution
We can put the perl code in a content report and execute the document code with the accompanying command:
$perl script.pl # Unix/Linux or C:>perl script.pl # Windows/DOS
Integrated Development Environment (IDE: Integrated Development Environment)
We additionally can execute perl contents on a couple of graphical individual interface (GUI) situations. The accompanying supported Perl incorporated advancement conditions are advocated:
Padre: Padre is an incorporation for Perl language engineers The improvement surroundings gives linguistic structure featuring and code refactoring.
EPIC : EPIC is a module for the Perl Eclipse IDE. In case you're familiar with Eclipse, you may utilize it.
Installation steps: Help- - >Eclipse Marketplace- - >Enter EPIC- - > Select Install and Update.