operators and their meanings.
Table 46.3 Compound Pattern Operators in Perl
OperatorMeaning&& Logical AND|| Logical OR! Logical NOT() Parentheses; used to group compound statementsArithmetic Operators
Perl supports a variety of math operations. Table 46.4 summarizes these
operators.
Table 46.4 Perl Arithmetic Operators
OperatorPurposex**y Raises x to the y power (same as x^y)x%y Calculates the remainder of x/yx+y Adds x to yx-y Subtracts y from xx*y Multiplies x by yx/y Divides x by y-y Negates y (switches the sign of y); also known as the unary minus++y Increments y by 1 and uses the value (prefix increment)y++ Uses the value of y and then increments by 1 (postfix increment)