17

Perl Programming for Unix Automation

Perl is a high-level, object-oriented programming language that supports many programming concepts found in languages such as C and C++. Moreover, for many Unix system administrators, Perl is the tool they depend the most on when it comes to getting the job done.

This chapter introduces the Perl language, the benefits of the language, how it fits into the Unix system administrator's tool chest and, most importantly, how to put Perl to use by writing and troubleshooting Perl scripts.

The original development goals for Perl, an acronym for Practical Extraction and Report Language, focused on developing an interpretive scripting language for file and text manipulation facilities. From this it has found a wide base of users who find it particularly well-suited for tasks involving quick prototyping and system management. Perl is also used in many cases as a bridge between systems by providing programming tools for bringing together a wide variety of applications, making Perl especially popular with programmers, system administrators, mathematicians, journalists, and even business managers.

Perl's open distribution policy and large support base of fellow users has also helped the popular rise of the language and its interpreters designed to process Perl syntax on various platforms. But it is various Unix systems, such as FreeBSD, Linux, and Solaris, that have really taken in the standard Perl library modules and documentation.

The following exercise ...

Get Beginning Unix now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.