diff options
Diffstat (limited to 'pod/perlvar.pod')
-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 |