Advanced Perl Techniques

Now, it’s time to move on to some of the more interesting things you can do with Perl in FreeBSD. These include file access, functions, modules, and—Perl’s hallmark—text-processing capabilities. The following sections take a look at each of these topics.

Text Processing

Perl’s primary strength and original purpose, as mentioned earlier, is text processing. Perl evolved from simpler text-processing tools whose efficiency came from their use of regular expressions.

A regular expression (also often called a regexp or regex) is a very highly developed way of specifying a pattern to seek in a text stream. You can use regexps to do simple searches on strings, or you can modify one to include such constraints as the beginning ...

Get FreeBSD6 Unleashed 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.