Since its introduction to the programming community in 1987, Perl has become today one of the most widely known and used programming languages. Designed by Larry Wall, and originally thought of as a natural enhancement for the popular cash shell script notation of UNIX, Perl was at first primarily used for text manipulation. Its maturity in the early 1990s coincided with the rise of the Web, and it rapidly became the most popular programming language for HTML form processing and other Web development as well.
Perl language overview
A discussion of the programming features and facilities of Perl is in order before we present the areas in which Perl can be applied.
Perl is an interpreted language, meaning that a control program that understands the semantics of the language and its components (the interpreter) executes program components individually as they are encountered in the control flow. Today this usually is done by first translating the source code into an intermediate representation— called byte code—and then interpreting the byte code. Interpreted execution makes Perl flexible, convenient, and fasts for programming, with some penalty paid in execution speed.
Scalar values can be manipulated by the common operators we would expect of a modern programming language. Numbers have arithmetic operations and logical comparisons, auto increment and decrement (++ and −−), and operator assignments (+ =, − =, ∗ =).
Perl has the expected assignment and referencing operators for arrays; it also provides sub-range operators to use part of an array. $#arr3 will give you the scalar value that is the last index used in array @arr3; because Perl indexes arrays from 0, $#arr3 + 1 will give the array length. Several predefined functions allow a programmer to use arrays as implementations of other data abstractions.
Hash (Associative Array)
Hashes have an assignment and multi-assignment to create attribute/value pairs and have array referencing via scalar subscripts (usually strings) to retrieve the value associated with an attribute.
Aside from syntactic differences, Perl has much the same while, until, and for loop structures most programming languages have. In keeping with the stated goal of being flexible and not limiting, however, Perl allows several forms of limited jumps within the context of loops that many other languages do not.
A subprogram in Perl is often called a function, but we shall use the term subroutine here to distinguish programmer-defined structures from the built-in functions of Perl. A subroutine is invoked within the context of some expression. In early versions of Perl, an ampersand (&) was placed before the subroutine name to denote invocation; current versions allow invocation without it as well. If the subroutine takes arguments, they are placed within parentheses following the name of the subroutine
Other Perl Features
Perl has several other features and capabilities that have found their way into the language as it evolved. These later features tend to be capabilities that programmers found useful in other languages and desired to have in Perl. In particular, Perl version 5 introduced classes, objects, and references (or pointers) into a language that was previously a more traditional UNIX scripting notation “on steroids.”