Perl Programming Language

Perl programming language is used for general purpose. It is a high level programming language which gives feature rich programs. The niche of this language is, it borrows many feature from other programming languages like C, shell scripting, AWK and sed. Some of the salient feature of Perl is it has a very powerful text processing attributes without the help of any Unix tools. Flexibility also is a feather in its cap. Over 22 years of development of this language has enabled it to have a plethora of features which help the user to create feature rich programs. Perl is also compatible with many operating systems and different configured computers. Due to its multi-tasking ability, Perl is nicknamed as ‘Swiss Army chainsaw of programming languages’.

Overview

Perl programming language is known to be a hybrid of Unix language. It has evolved from the Unix community. Though Unix was created in 1969, it was only until 1987 that Perl has come out in the open market. Larry Wall, who was working in Unisys was the first to release the primitive version of Perl 1.0 on December 18, 1987. Due to its open source nature, it expanded rapidly.

One after the other, various features was accumulated in Perl and it was widely used in the programming language. Each version of Perl bought the better of the last one and also included a completely new feature in its artillery. There are up to 6 versions of Perl. Though Perl 6 is still being worked on, there are some notable versions of Perl language.

Perl 1.0 – It was the first of the Perl versions. This was launched in the year 1987.

Perl 2.0 – This version was considered to be the beginning of the vast expansion of the Perl language. It came with a much evolved regular expression engine. This version was released in the very next year of the previous version.

Perl 3.0 – The very next year, 1989, Perl 3 was launched. This had the support of binary streaming which was a revolution in programming in those times.

Perl 4.0 – The first official reference book was launched in 1991. It was known as Programming Perl. This was known as the “Camel Book”. Version 4 of Perl language was also mentioned in this book.

Perl 5.0 – Larry Wall developed Perl 4 till it was escalated to 4.036. After this Wall abandoned it and started working on Perl 5. There were many modifications and additions in the 5th version of Perl. It has expanded itself into many departments and provided a wider range of utility. In 1994, Perl 5 was released for the first time. There were many additions to the language. It had objects, references, lexical variable, modules etc. Another version was released immediately known as Perl5-porters which was designed to work on various platforms. Ever since Perl5 is being developed till now.

Perl 5.001 was released in 1995 and Perl 5.002 in 1996. These had various prototypes features. Perl 5.003 was a security version which was launched on June 25th 1996. Perl 5.004 was a special version where Perl could run in any operating system. It had the ability to derive various classes automatically. This allowed the language to acquire different versions of modules. Perl 5.005 was and extended version of Perl 5.004. It has more modules added to it which could support versatile operating systems. This was released in 1998. The language engine was enhanced to Regex engine for this version.

The present version which is being used is Perl 5.6 which was released in 2000. In 2000 Larry Wall asked the community to come up with new ideas to improve the language. This lead to an improved 64-bit support, Unicode string representation, large file support. Later in 2002, Perl 5.8 was released which had improved numeric accuracy, new IO implementations, added Unicode support.

On the 20th anniversary of Perl 1.0, the community launched Perl 5.10.0 which was equipped with switch statement, smart match operators, regular expression updates.

The recently released Perl 5 version is Perl 5.13.4, which was on August 20, 2010. This version was developed by Florian Ragwitz.

Perl 6.0 – It was while the developing of Perl 5.10.0 that Perl 6 looked very much on the cards. In 2009, Perl 6 had a regular release of it versions. It is also known as Rakudo Perl.

Basics of Perl

Any language can be perfected only if the basics are learnt properly. It is important to know the basic structure of a language and what are the syntax and symmetric of the language. Perl is known as an interpreter language. The programs which are written in Perl are known as Scripts, this is due to the unix background of Perl. The syntax of Perl is flexible and compact.

Following are some of the features where Perl is known to be exceptionally well used. Here are some basic data types and values used in Perl.

Scalars – Scalars are the variables to which value is assigned. These variables are prefixed with ‘$’. Case matters when it comes to writing Perl scripts.

Arrays – Arrays are also variables which carry a definite value.  These variables are denoted with a prefix of ‘@’.

Hashes – These are the elements which are represented by a scalar. They are known as associative arrays which do not have an integer value. These elements are denoted by ‘#’ in Perl scripts.

Apart from these there are also scalar operators, array operations and hash operations. Scalars have logical and arithmetic operations which involve addition, subtraction, multiplication and division. For arrays, expected assignment and referencing are the operators used.  Most of the operation functions for hash are in the array name.

Perl has the while, until and for loops used in its control flow. It also allows different forms of loops. This feature is not seen in any other languages.

Applications of Perl

The major applications of Perl language is done in system administration and web applications. There are numerous high traffic websites which use Perl to administer their websites. Also GUI’s (graphical user interface) can be developed using this language.

Some of the popular sites which use Perl are amazon.com, bbc.co.uk, priceline.com etc.