Hour 9. More Functions and Operators

What You'll Learn in This Hour:

  • How to do simple string searches on scalars

  • How to do character substitutions

  • How to use the print function

  • How to use arrays as stacks and queues

The Perl culture follows the tradition of “There Is More Than One Way To Do It,” and in this hour, you will look more closely at that philosophy. You will learn a potpourri of new functions and operators.

For scalar searching and manipulation, you've been using regular expressions until this point. There is more than one way to do the job, so Perl provides a variety of functions for searching and editing scalars. In this hour, some of the other ways will be presented.

Also, you've viewed arrays as linear lists of items to be iterated ...

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