From: abela@geneanet.org Date: Tue, 6 Mar 2001 15:57:57 +0000 (+0100) Subject: [ID 20010306.004] || != named unary operator X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3981b0ebe841a21d93c91813d65c2517616f3b93;p=p5sagit%2Fp5-mst-13.2.git [ID 20010306.004] || != named unary operator Message-Id: <20010306145757.0CB03D183@little-roots.geneanet.org> p4raw-id: //depot/perl@9072 --- diff --git a/pod/perlop.pod b/pod/perlop.pod index 8f2ecde..9e6634a 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -242,14 +242,15 @@ operators, like C<-f>, C<-M>, etc. See L. If any list operator (print(), etc.) or any unary operator (chdir(), etc.) is followed by a left parenthesis as the next token, the operator and arguments within parentheses are taken to be of highest precedence, -just like a normal function call. Examples: +just like a normal function call. For example, +because named unary operators are higher precedence than ||: chdir $foo || die; # (chdir $foo) || die chdir($foo) || die; # (chdir $foo) || die chdir ($foo) || die; # (chdir $foo) || die chdir +($foo) || die; # (chdir $foo) || die -but, because * is higher precedence than ||: +but, because * is higher precedence than named operators: chdir $foo * 20; # chdir ($foo * 20) chdir($foo) * 20; # (chdir $foo) * 20