$[ clarifications.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 27 Apr 2003 19:35:11 +0000 (19:35 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 27 Apr 2003 19:35:11 +0000 (19:35 +0000)
p4raw-id: //depot/perl@19354

pod/perlvar.pod

index 571953f..3b9ed06 100644 (file)
@@ -883,8 +883,14 @@ subscripting and when evaluating the index() and substr() functions.
 
 As of release 5 of Perl, assignment to C<$[> is treated as a compiler
 directive, and cannot influence the behavior of any other file.
+(That's why you can only assign compile-time constants to it.)
 Its use is highly discouraged.
 
+Note that, unlike other compile-time directives (such as L<strict>),
+assignment to $[ can be seen from outer lexical scopes in the same file.
+However, you can use local() on it to strictly bound its value to a
+lexical block.
+
 =item $]
 
 The version + patchlevel / 1000 of the Perl interpreter.  This variable