Home Software Developers Tutorials Perl
PROJECT MANAGERS SOFTWARE DEVELOPERS FRESHERS STUDENTS
TUTORIALS

 

C++ Tutorial
C# Tutorial
JAVA Tutorial
J2EE Tutorial
J2ME Tutorial
JBOSS Tutorial
VB Tutorial
PERL Tutorial
PHP Tutorial
UML Tutorial
XML Tutorial
Mainframe Tutorial
COBOL Tutorial
BSD Tutorial
ECLIPSE Tutorial
FIREWALLS Tutorial
VB.NET Tutorial
ASP. NET Tutorial
MYSQL Tutorial
NETWORKING Tutorial
PYTHON Tutorial
WEBLOGIC Tutorial
SQL Tutorial
ORACLE Tutorial
MULTIMEDIA Tutorial
SAP Tutorial
SOLARIS Tutorial
SYMBIAN Tutorial
System Admin Tutorial
UNIX Tutorial
 

PERL Tutorial

Perl, also Practical Extraction and Report Language (a backronym, see below) is a dynamic procedural programming language designed by Larry Wall and first released in 1987. Perl borrows features from C, shell scripting (sh), AWK, sed, Lisp, and, to a lesser extent, many other programming languages.

Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.
The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). Its major features are that it's easy to use, supports both procedural and object-oriented (OO) programming, has powerful built-in support for text processing, and has a large collection of third-party modules.

 
History
Larry Wall began work on Perl in 1987, and released version 1.0 to the comp.sources.misc newsgroup on December 18, 1987. The language expanded rapidly over the next few years. Perl 2, released in 1988, featured a better regular expression engine. Perl 3, released in 1989, added support for binary data.

Until 1991, the only documentation for Perl was a single (increasingly lengthy) man page. In 1991, Programming Perl (the Camel Book) was published, and became the de facto reference for the language. At the same time, the Perl version number was bumped to 4, not to mark a major change in the language, but to identify the version that was documented by the book.

Perl 4 went through a series of maintenance releases, culminating in Perl 4.036 in 1993. At that point, Larry Wall abandoned Perl 4 to begin work on Perl 5. Perl 4 remains at version 4.036 to this day.

Development of Perl 5 continued into 1994. The perl5-porters mailing list was established in May 1994 to coordinate work on porting Perl 5 to different platforms. It remains the primary forum for development, maintenance, and porting of Perl 5.

Perl 5 was released on October 17, 1994. It was a nearly complete rewrite of the interpreter, and added many new features to the language, including objects, references, packages, and modules. Importantly, modules provided a mechanism for extending the language without modifying the interpreter. This allowed the core interpreter to stabilize, even as it enabled ordinary Perl programmers to add new language features.

On October 26, 1995, the Comprehensive Perl Archive Network (the CPAN) was established. The CPAN is a collection of web sites that archive and distribute Perl sources, binary distributions, documentation, scripts, and modules. Originally, each CPAN site had to be accessed through its own URL. Today, the single URL http://www.cpan.org automatically redirects to one of several hundred CPAN mirror sites.

As of 2006, Perl 5 is still being actively maintained. Important features and some essential new language constructs have been added along the way, including Unicode support, threads, an improved support for object oriented programming and many other enhancements. The latest stable release is Perl 5.8.8.

Design
The design of Perl can be understood as a response to three broad trends in the computer industry: falling hardware costs, rising labor costs, and improvements in compiler technology. Many earlier computer languages, such as Fortran and C, were designed to make efficient use of expensive computer hardware. In contrast, Perl is designed to make efficient use of expensive computer programmers.

Perl has many features that ease the programmer's task at the expense of greater CPU and memory requirements. These include automatic memory management; dynamic typing; strings, lists, and hashes; regular expressions; introspection and an eval() function.

Larry Wall was trained as a linguist, and the design of Perl is very much informed by linguistic principles. Examples include Huffman coding (common constructions should be short), good end-weighting (the important information should come first), and a large collection of language primitives. Perl favors language constructs that are natural for humans to read and write, even where they complicate the Perl interpreter.

Perl syntax reflects the idea that "things that are different should look different". For example, scalars, arrays, and hashes have different leading sigils. Array indices and hash keys use different kinds of braces. Strings and regular expressions have different standard delimiters. This approach can be contrasted with languages like Lisp, where the same S-expression construct and basic syntax is used for many different purposes.

Perl has features that support a variety of programming paradigms, such as procedural, functional, and object-oriented. At the same time, Perl does not enforce any particular paradigm, or even require the programmer to choose among them.

There is a broad practical bent to both the Perl language and the community and culture that surround it. The preface to Programming Perl begins, "Perl is a language for getting your job done." One consequence of this is that Perl is not a tidy language. It includes features if people use them, tolerates exceptions to its rules, and employs heuristics to resolve syntactical ambiguities. Because of the forgiving nature of the compiler, bugs can be hard to find sometimes. Discussing the variant behaviour of built-in functions in list and scalar contexts, the perlfunc(1) manual page says "In general, they do what you want, unless you want consistency."

Perl has several mottos that convey aspects of its design and use. One is "There's more than one way to do it." (TMTOWTDI, usually pronounced 'Tim Toady'). Others are "Perl: the Swiss Army Chainsaw of Programming Languages" and "No unnecessary limits". A stated design goal of Perl is to make easy tasks easy and difficult tasks possible. Perl has also been called "The Duct Tape of the Internet".

Name
Perl was originally named "Pearl", after "the pearl of great price" of Matthew 13:46. Larry Wall wanted to give the language a short name with positive connotations; he claims that he looked at (and rejected) every three- and four-letter word in the dictionary. He also considered naming it after his wife Gloria. Wall discovered before the language's official release that there was already a programming language named PEARL and changed the spelling of the name.

The name is normally capitalized (Perl) when referring to the language and uncapitalized (perl) when referring to the interpreter program itself since Unix-like file systems are case sensitive. Before the release of the first edition of Programming Perl it was common to refer to the language as perl; Randal L. Schwartz, however, forced the uppercase language name in the book to make the name stand out better when typeset. The case distinction was subsequently adopted by the community.

It is not appropriate to write "PERL", as it is not an acronym. The spelling of PERL in all caps is therefore used as a shibboleth for detecting community outsiders. However, several backronyms have been suggested, including the humorous Pathologically Eclectic Rubbish Lister. The more serious Practical Extraction and Report Language has prevailed in many of today's manuals, including the official Perl man page. It is also consistent with the old name "Pearl": Practical Extraction And Report Language.

PERL Tutorial
The objective of this online tutorial is to provide free tutorial for beginners and intermediate users. This tutorial employed a user-friendly approach by using very simple language to explain the technical terms of programming, and included a lot of interesting examples.
Robert's Perl Tutorial
Download PERL tutorial PDF files
Here you can download 17 good tutorials in PDF format