Operators
Table 4-3 lists all the Perl operators from highest to lowest precedence and indicates their associativity.
Table 4-3. Perl associativity and operators, listed by precedence
Associativity | Operators |
|---|---|
Left | Terms and list operators (leftward) |
Left | |
Nonassociative | |
Right | |
Right | |
Left | |
Left | |
Left | |
Left | |
Nonassociative | Named unary operators and file-test operators |
Nonassociative | |
Nonassociative | |
Left | |
Left | |
Left | |
Left | |
Nonassociative | |
Right | |
Right | |
Left | |
Nonassociative | List operators (rightward) |
Right | |
Left | |
Left | |
You can clarify your expressions by using parentheses to group any part of an expression. Anything in parentheses will be evaluated as a single unit within a larger expression.
With very few exceptions, Perl operators act ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access