diff options
author | abela@geneanet.org <abela@geneanet.org> | 2001-03-06 16:57:57 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-07 16:32:30 +0000 |
commit | 3981b0ebe841a21d93c91813d65c2517616f3b93 (patch) | |
tree | 637ae00fa6edb55d66aded616c997483e8cb5658 /pod/perlop.pod | |
parent | 42e0c139f8b9f929ff5eade043377a0a73a3e716 (diff) | |
download | perl-3981b0ebe841a21d93c91813d65c2517616f3b93.tar.gz |
[ID 20010306.004] || != named unary operator
Message-Id: <20010306145757.0CB03D183@little-roots.geneanet.org>
p4raw-id: //depot/perl@9072
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r-- | pod/perlop.pod | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod index 8f2ecde031..9e6634a5c3 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -242,14 +242,15 @@ operators, like C<-f>, C<-M>, etc. See L<perlfunc>. 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 |