June 2005
Beginner
480 pages
10h 31m
English
Controlling the way your program executes with loops and condition statements is fine, but other flow control statements are needed to make readable programs. For example, Perl has statements to exit a while loop early, to skip certain portions of a for loop, to exit an if statement before the end of a block, or even to exit your program without falling off the end. Using some of the constructs explained in this section can make your Perl programs more concise and easier to read.
The if statements have one more possible syntax. If you have only one expression inside the if block, the expression can actually precede the if statements. So, instead of writing
if (test_expression ) { expression ; }
you ...
Read now
Unlock full access