Perl: An Alternate Administrative Language

Perl[3] is a free programming language created by Larry Wall and currently developed and maintained by a core group of talented programmers (see, and for more information). Perl has become quite popular in recent years. It contains many features that make it very well suited to writing scripts for system administrative tasks, including the following:

  • It combines the short development time of traditional shell programming with some of the best aspects of high-level languages such as C. For example, Perl contains well-implemented arrays (unlike any shell) and an impressive range of built-in functions, and it also includes the ability easily to run standard Unix commands and use filename wildcards (as in a shell).

  • It provides things that are missing from most or all shells, including string functions, built-in arithmetic, and general regular expression support.

  • Handling many simultaneous open files is a breeze.

  • It offers enhanced security features over standard shells.

Perl features come from a variety of sources, including standard shells, C, Fortran, Basic, Pascal, awk, and sed. I don’t think Larry’s managed to use any COBOL features yet, but I’ve been wrong before.

To get started using Perl, I recommend the following books:

  • Learning Perl, by Randall L. Schwartz and Tom Phoenix (O’Reilly & Associates), and Effective Perl Programming, by Joseph N. Hall with Randal L. Schwartz (Addison-Wesley). ...

Get Essential System Administration, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.