PSL Operator Precedence and Associativity

The precedence and associativity of PSL operators is almost identical to that of C and Perl. The following table lists the PSL operators in descending order of precedence.

OperatorPrecedenceAssociativity
=lowestright
+=, -=, <<=, >>=, ^= right
*=, /=, %= right
|=, &= right
?: (ternary) right
|| left
&& left
| left
^ left
& left
!=, ==, =~, !~  left 
<, <=, >, >=  left 
<<, >>  left 
+, - (binary)  left 
*, /, %  left 
. (string concat)  left 
-, !, ++, -- right 
()  left 
[] highestleft 

Where to go from here

PSL Operators 

Was this page helpful? Yes No Submitting... Thank you

Comments