September 2002
Intermediate to advanced
496 pages
10h
English
Like any modern programming language, Perl has a wide variety of control flow constructs. They are typically subdivided into looping constructs and decision-making constructs.
Decision-making constructions in Perl center around various if constructs. There is also an unless construct whose main appeal is in error checking.
Decisions in Perl are made with the keyword if. Depending upon the particular logic of the program, there may also be an else portion to go along with the if. In the simple example shown here, the opening and closing curly braces are necessary even in the case where there is only one statement in the body of either the if or the else portion. The tested expression is either ...
Read now
Unlock full access