summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-09 04:00:23 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-09 04:00:23 +0000
commit39429b3b45b7029694dcb200fceedc0a2e6174fb (patch)
treed3bf3361213b8cb151e453e48b7fd06dd990f8e8 /pod
parenta0be28da97d0d38b5ef9181812da403f4e9ce11f (diff)
downloadperl-39429b3b45b7029694dcb200fceedc0a2e6174fb.tar.gz
document compatibility issue with literal list slices and NOTOP
(C<not (1,2,3)[0]> is now a syntax error) p4raw-id: //depot/perl@4673
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod22
1 files changed, 22 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 5fba7687be..924996dbac 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -125,6 +125,28 @@ The undocumented special variable C<%@> that used to accumulate
has been removed, because it could potentially result in memory
leaks.
+=item Parenthesized not() behaves like a list operator
+
+The C<not> operator now falls under the "if it looks like a function,
+it behaves like a function" rule.
+
+As a result, the parenthesized form can be used with C<grep> and C<map>.
+The following construct used to be a syntax error before, but it works
+as expected now:
+
+ grep not($_), @things;
+
+On the other hand, using C<not> with a literal list slice may not
+work. The following previously allowed construct:
+
+ print not (1,2,3)[0];
+
+needs to written with additional parentheses now:
+
+ print not((1,2,3)[0]);
+
+The behavior remains unaffected when C<not> is not followed by parentheses.
+
=back
=head2 C Source Incompatibilities