Summary

In this hour, you learned that searching for strings within other strings doesn't have to involve regular expressions; you can perform simple searches by using index and rindex. You also can make simple substitutions by using the tr/// operator. The substr function can be used for both extracting data from strings and editing them. You can create nicely formatted output in Perl by using the printf and sprintf statements. Additionally, you saw arrays used as stacks of items instead of flat lists, and you learned how to manipulate those stacks.

Get Sams Teach Yourself Perl in 24 Hours 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.