What Is Perl?
Perl stands for Practical Extraction and Report Language. However, some people refer to it as Pattern Extraction and Reporting Language. It is about 20 years old (at the time of this writing), and has its origins in the C programming language and the UNIX operating system (which inspired the Linux operating system).
Perl was created by Larry Wall, supposedly as an efficient way to scan text files and find text patterns. Its command syntax is mostly C-based, but it was also influenced by a number of pattern matching and text editing utilities available on UNIX at the time, especially in the area of regular expressions.
Regular expressions are a pseudo-mathematical syntax that allow complex text pattern rules to be described compactly. Computer programs then match the pattern rules against actual input text. Note that the text in this context refers to alphabetic, numeric, and punctuation characters, as well as special types of “whitespace” including spaces, tabs, carriage returns, etc.
For example, if you use a text editing program to change all occurrences of the word “hello” to the word “bonjour”, you are taking advantage of the text editor’s very basic pattern matching abilities. However, if you want to only change those occurrences of “Hello” which start at the very beginning of a line of input text, then you start to get into requiring regular expressions. Other pattern matching programs and utilities may differ slightly, but in Perl, you would specify
s/^Hello/Bonjour/g
This regular expression says: substitute all capitalized occurrences of “Hello” that start at the very beginning of a line of input text with the word “Bonjour”. The ’s’ means ’substitute’; the ‘g’ means ‘globally’ - that is, all occurrences. (I’m simplifying for the sake of argument.)
In the right hands, Perl is an incredibly powerful programming language, which can be used to rapidly prototype solutions. It was initially used from the command line, but is now also used as a web scripting language. However, because it cannot (currently) be interleaved with HTML code like PHP can, and because its compact, elegant regex (regular expression) syntax often scares people with and without computer programming backgrounds, it is not as widely used online as PHP.
Take it from me, though, that I have met numerous people without programming backgrounds who managed to teach themselves Perl and actually find long-term employment from doing so. It takes a certain frame of mind to take advantage of Perl’s pattern matching features and ultra-rich data structures, but this can be learned.
If you are looking for tutorials on Perl, please visit the WebGuru Web Programming journal. There are some initial tutorials there, and I have several more tutorials planned. For more advanced discussions, you can also check out O’Reilly’s Perl website.
(c) Copyright 2006-present, Raj Kumar Dash, http://www.chameleonintegration.com/
Technorati Tags: technobabble, techno babble, Perl, web scripting, web programming languages

tag this













Leave a Comment