Advanced Perl Techniques

Now that we've covered the fundamentals of Perl, it's time to move on to some of the more interesting things we can do with it. So far we've seen nothing about file access, functions, modules, or even Perl's hallmark: its text-processing capabilities. Let's take a look at some of these now.

Text Processing

A regular expression (also often called a regexp) 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 or end of a line, groups of certain characters, included strings of arbitrary length, or any of a flexible number of occurrences of any pattern. Regexps are part of many ...

Get FreeBSD® 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.