September 2002
Intermediate to advanced
496 pages
10h
English
Perl has an abundance of operators. Many of them come from the C programming language, some come from the UNIX shells, and others are strictly particular to Perl. Before we see the complete set of Perl operators, we must explain some preliminary concepts.
Operator precedence defines the order in which operators are to be executed. Operator associativity defines the order when there are ties in the precedence. For example, most languages define multiplication to be higher in precedence than addition, and thus the following evaluates to 17, and not 21.
$x = 2 + 5 * 3;
But what if an expression involves operators of the same precedence?
$x = 200 / 5 * 10;
The precedence does not tell us anything, ...