O'Reilly logo

Pro Perl by Peter Wainwright

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required