develooper Front page | perl.perl5.porters | Postings from December 2015

Re: [perl #127063] Setting $[ = 0 should not generate a warning

Thread Previous | Thread Next
December 29, 2015 00:34
Re: [perl #127063] Setting $[ = 0 should not generate a warning
Message ID:
>On Mon Dec 28 14:19:28 2015, wrote:
>This warning makes some old code noisy even if the only thing the code does
> is to set $[ to zero to to protect against callers leaving $[ in another
>state (which was possible Perl 4, at least).

It is not possible in Perl 5.  $[ has been lexically scoped since 5.000.
The only purpose of assigning to $[ in Perl 5 is if the code is actually
Perl 4 code, and needs to remain runnable on Perl 4.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About