Index   -   Next  >


What is Perl?


- Practical Extraction and Reporting Language -
 
- Portable Regular Expression Language -
 
- Pathalogical Eclectic Rubbish Lister -
 

Brainchild of Larry Wall, Perl is a script programming language with a syntax vaguely similar to C (or C++ when going object oriented). Perl provides the awesome power of utilities familiar to Unix shell script programmers.

Perl is an interpreted (scripting) language usually compiled immediately before execution. The resulting binaries can be retained to improve throughput. When pre-compiled, a Perl program can be almost (but not quite) as fast as a C language program. In the hands of a perl monger the power of Perl is the speed at which complex applications can be developed.

Perl is regarded as a good choice for developing Common Gateway Interface programs because it has excellent text manipulation facilities as well as the ability to handle binary files. Perl has exraordinary scope thanks to an extensive library of Perl modules e.g. CGI.pm.

Perl benefits from the combined features of:
 

Which leads to Perl being...

"Perl is designed to assist the programmer with common tasks that are probably too heavy or too portability sensitive for the shell, and yet too wierd, short lived or complicated to code in C" - Schwartz & Christiansen

"We will encourage you to develop the three great virtues of a programmer: laziness, impatience and hubris" - Wall

Downside: tends to be a write only language - so use Python instead! (or ruby)
This is not actually true. Perl can be written in beautifully structured modular and object oriented ways but:

The extensive scope of Perl means that symbols (and keywords) overload heavily (context dependent) and...
Perl supports a great deal of shorthand notation and...
Any code that makes extensive use of regular expressions will be less than easy to read.

So not only is it is possible to achieve a great deal with a small amount of code but...

The scope of the language means that even a competent Perl programmer will keep learning new tricks.
TMTOWTDI - There's More Than One Way To Do It

Version

The current stable version of Perl is 5.6.1, 5.5.3 is used on the Greenwich Unix machines, 5.8.0 developers release.
Perl 6 is still under development.
An Apache module, mod-perl, improves performance by running the Perl interpreter as part of the web server process, as opposed to spawning a new process. cf. PHP

Books

Many (25) excellent books are published by O'Reilly & Associates (Larry Wall is an associate):
Learning Perl
Randal L Schwartz & Tom Christianson - the Llama Book
Programming Perl
Larry Wall, Tom Christianson & Randal L Schwartz - the Camel Book
The Perl Cookbook
Tom Christianson & Nathan Torkington - the Ram Book
Learning Perl on Win32 Systems
Randal L Schwartz, Erik Olson & Tom Christianson - the Gecko Book
Advanced Perl Programming
Sriram Srinivasan - the Panther Book
Mastering Regular Expressions
Jeffrey E. F. Friedel - the Owls Book

Resources


Index   -   Next  >

best viewed using Mozilla browsers
© k.mcmanus 2004
Valid XHTML 1.0! . Valid CSS . WCAG priority 3 approved