Statement Blocks
Statement Blocks
-
All control structures are divided
into the control statement (which we will explain below) and the statement
block. The statement block is simply a group of commands that are executed
together. This block is grouped by enclosing the commands within curly
braces ({}). For example, the following is a simple statement block.
{
statement one
statement two
statement three
}
Perl will execute each statement
in a statement block from beginning to end as a group. When, how, or if
the script will execute the commands however, is determined by the control
statement.
Additional Resources:
Perl
Control Structures
Table of Contents
Using the if, elsif,
else and unless Control Statements
|