Introduction to Perl

Perl(Practical Extraction and Report Language) is especially designed for text processing by Larry Wall. Perl is a high level programming language and hence one can easily undertand Perl as the programs are in simple english.

Key features

  • Cross-platform programming language
  • Efficient for mission critical applications.
  • Open-source
  • Supports both procedural and object-oriented programming.
  • Perl interpreter is embeddable with other systems.
  • Loosely typed language
  • One of the most popular languages for CGI programming on the Web.
  • Efficient for text processing.
  • popular for web applications development and for it's speed.

Is Perl popular now?

  • Perl is in industry from past 30+ years.
  • It was one of the most popular languages in 90's and 2000's. Though it's not as popular as it was before but it's still active and developer's with Perl experience are offered high salaries.
  • Perl is still popular for text processing capabilities.

Sample program

print "Hello World!!"; # to display "Hello World!!"

Run here

Installation

1. On Windows

  1. Download the software from Perl Downloads

  2. Run the executable file to install Perl.

  3. Follow the installation steps to finish the setup.

  4. Once the installation is completed, check the installation by using the below command in command prompt.

    perl -v
    

2. On Linux

  1. Most Linux modern Linux distributions come with a recent version of Perl. If not, you can download the software form Perl Downloads
  2. Execute the below commands
    tar -xzf perl-5.30.2.tar.gz
    cd perl-5.30.2
    $./Configure -de
    $make
    $make test
    $make install
    

Note :

Change the version based on the file you have downloaded in the above commands

3. On MacOS

  1. Recent MacOS will have Perl installed in-built. If not, you can download the software form Perl Downloads
  2. change the directory
    cd ~/Downloads
    
  3. Run the below commands
    tar -xzf perl-5.30.2.tar.gz
    cd perl-5.30.2
    ./Configure -de
    make
    make test
    make install
    

Note :

Change the version based on the file you have downloaded in the above commands

Using OneCompiler

  1. You don't need to install any software or compiler.
  2. Just goto OneCompiler and choose the programming language as Perl and enjoy programming without any installation.