Skip to Content
Perl Debugged
book

Perl Debugged

by Peter Scott, Ed Wright
March 2001
Intermediate to advanced
288 pages
4h 56m
English
Addison-Wesley Professional
Content preview from Perl Debugged

4.2. The Hall of the Precedence

Perl has a complicated precedence ordering; it helps to be able to look it up quickly (fortunately, it's the first thing out of perldoc perlop). We reproduce that table here (Table 4-1) because we'll be referring to it.

Table 4-1. Perl Operator Precedence and Associativity
Associativity Operators
Left Terms and list operators (leftward)
Left ->
Nonassoc ++ --
Right **
Right ! ~ \ and unary + and -
Left =~ !~
Left * / % x
Left + - .
Left << >>
Nonassoc Named unary and file test operators
Nonassoc < > <= >= lt gt le ge
Nonassoc == != <=> eq ne cmp
Left &
Left | ^
Left &&
Left ||
Nonassoc .. …
Right ?:
Right = op=
Left , =>
Nonassoc List operators (rightward)
Right not
Left and
Left or xor

Associativity tells you ...

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.
Start your free trial

You might also like

Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe
Pro Perl

Pro Perl

Peter Wainwright
Intermediate Perl

Intermediate Perl

Randal L. Schwartz, brian d foy, Tom Phoenix
Perl Testing: A Developer's Notebook

Perl Testing: A Developer's Notebook

Ian Langworth, Chromatic

Publisher Resources

ISBN: 0201700549Purchase book