CHAPTER 11Interpolation and Regular Expressions

Interpolation and regular expressions are two of Perl's most powerful features, providing us with the ability to match, substitute, and generally mangle and manipulate text in almost any way we can conceive. Interpolation is merely the process of evaluating variables within strings and substituting their names with the corresponding values. We can interpolate scalars directly, and handily we can also interpolate arrays to render all their elements into the string. We can also interpolate special characters such as linefeeds or instructions such as uppercasing all text that follows. More advanced use of interpolation allows us to interpolate code and subroutine calls too.

The regular expression ...

Get Pro Perl 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.