diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-27 19:35:11 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-27 19:35:11 +0000 |
commit | f83ed19842c1a7c71229dd090f299e643e1fe3fb (patch) | |
tree | a722e5234864b4261d4d7740b330b12062921923 | |
parent | 4bc2a53d56342b38b43b34f3eb45a2da19b2984f (diff) | |
download | perl-f83ed19842c1a7c71229dd090f299e643e1fe3fb.tar.gz |
$[ clarifications.
p4raw-id: //depot/perl@19354
-rw-r--r-- | pod/perlvar.pod | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 571953fcbc..3b9ed060af 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -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 |