Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

The list is ordered from highest precedence to lowest:

left terms and list operators (leftward)
left ->
nonassoc     ++ --
right **
right ! ~ \ and unary + and -
left =~ !~
left * / % x
left + - .
left << >>
nonassoc named unary operators
nonassoc < > <= >= lt gt le ge
nonassoc == != <=> eq ne cmp
left &
left | ^
left &&
left ||
nonassoc .. ...
right ?:
right = += -= *= etc.
left , =>
nonassoc list operators (rightward)
right not
left and
left or xor

Notes:

The left column of the list shows the associativity precedence of the operators.

The associativity column shows the order of evaluation of the operators when there are 2 (or more) operators with the same precedence in a given expression. 'left' means that the leftmost operator is evaluated first; likewise, 'right' evaluates first the rightmost operator.

For example, in the expression

a + b - c

a + b is evaluated first (left associativity)