June 2002
Beginner
759 pages
80h 42m
English
Perl recognizes the following operators for assigning a value to a variable:
= **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=
Each operator requires a variable on the left side and an
expression on the right side. For the simple assignment operator, =, the value of the expression is stored
in the designated variable. For the other operators, Perl evaluates
the expression:
$var OP= $valueas if it was written:
$var = $var OP $valueexcept that $var is
evaluated only once. For example:
$a += 2; # Same as $a = $a + 2