Going Deeper

As with the previous lessons, I still haven't told you everything you might want to know about conditionals and loops. In this section, I'll summarize some of these other features. Feel free to explore these features of the Perl language on your own.

Conditional and Loop Modifiers

The conditionals and loops you learned about in today's lesson are all complex statements—they operate on blocks of other statements, and don't require a semicolon at the end of the line. However, Perl also includes a set of modifiers to simple statements that can be used to form conditional and loop-like expressions. Sometimes these modifiers can provide shorter versions of simple conditionals and loops; other times they can help you express the logic ...

Get Sams Teach Yourself Perl in 21 Days, Second 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.