From: Gurusamy Sarathy Date: Thu, 9 Dec 1999 04:00:23 +0000 (+0000) Subject: document compatibility issue with literal list slices and NOTOP X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39429b3b45b7029694dcb200fceedc0a2e6174fb;p=p5sagit%2Fp5-mst-13.2.git document compatibility issue with literal list slices and NOTOP (C is now a syntax error) p4raw-id: //depot/perl@4673 --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 5fba768..924996d 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 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 and C. +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 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 is not followed by parentheses. + =back =head2 C Source Incompatibilities