What is Perl

Perl is a useful language for a lot of systems administration tasks - you can take many of your every day tasks, and automate them, so they happen regularly and efficiently.

Written initially by Larry Wall, and now maintained by many people, it is derived from C, with a little bit of sed, awk, shell and many other languages. Its support for file, process and text manipulation makes it ideal for systems administrators, as it can be used as a ``glue'' language, to facilitate gathering and displaying of data.

It was originally written by Larry Wall in 1988, and has progressed through 4 major revisions, until version 5 today. Perl5 is almost a complete rewrite, with many improvements from the previous versions, including usability enhancements, object oriented programming, reusability, and much more.

Version Date
Perl1 January 1988
Perl2 June 1988
Perl3 October 1989
Perl4 March 1991
Perl5 October 1994

One of the main advantages of Perl is CPAN - the Comprehensive Perl Archive Network. It contains hundreds and hundreds of perl modules, from CGI to Corba and database access, as well as the source for perl. The modules make it easy to reuse code, as they are mirrored all around the world. There is also a CPAN module, which makes it easier to search for modules in CPAN, and help install them. These modules make it easy to glue the language together with databases, and to extend the language in many ways.

Perl is also easy to learn - forget what you've been told about it being hard. The biggest advantage is that you don't need to know everything about the language before you can use it. As the Perl FAQ says, the learning curve is shallow, but long. This means you can easily start programming in it with minimal investment of time, and as you learn more, easily start using it. The other advantage is that most tasks only use a small subset of the language, so its easy to just learn enough for what you're currently doing - in Perl, this is commonly refered to as TMTOWTDI, or There's More Than One Way To Do It. It is also very similar to most other programming languages, so if you've written a program in just about anything before, it will be familiar.

Regular expressions are perceived as being possibly the hardest part of Perl, but they are perhaps the most useful. They are the core of its strength in text processing, and the basics are actually fairly simple. Perl regular expressions (commonly refered to as regexp) make it easy to loop over a file or the output from a process, and grab information from it. This makes it useful for analysising log files, or for reducing the output from commands to make it more managable.

Beyond all this, however, is the community of people behind Perl. There are mailing lists, news groups, and plenty of webpages created by people who use Perl every day. With help from these, and the many reference books available, Perl is sure to help you learn the 3 great virtues of a programmer - which are strangely similar to those of a sysadmin - laziness, impatience, and hubris - see ``Programming Perl'' for more information on these virtues. But, above all this, it can help you get your job done.

Related Links

http://language.perl.com/versus/ - Comparisons between Perl and other languages
http://language.perl.com/
http://language.perl.com/faq/ - Perl FAQ
``Programming Perl, 2nd Edition'', by Larry Wall, Tom Christiansen, and Randal L. Schwartz, published by O'Reilly and Associates - ISBN 1-56592-149-6
Usenet groups: comp.lang.perl.announce, comp.lang.perl.misc, comp.lang.perl.moderated, comp.lang.perl.modules, and many others
http://www.perl.com/CPAN/ - CPAN