Hour 9. More Functions and Operators

 <  Day Day Up  >  

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 through with foreach or joined together with join to make scalars. In this hour, you'll learn a whole new way of looking at arrays.

Finally, the plain vanilla print function will be revisited ”and spiced up a bit. With a new and improved print function, you too can write nicely formatted reports suitable for presentation to others.

 <  Day Day Up  >  


SAMS Teach Yourself Perl in 24 Hours
Sams Teach Yourself Perl in 24 Hours (3rd Edition)
ISBN: 0672327937
EAN: 2147483647
Year: 2005
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net