develooper Front page | perl.perl5.porters | Postings from March 2013

Deprecation warning for reading $[

Thread Next
Ed Avis
March 1, 2013 13:06
Deprecation warning for reading $[
Message ID:
I was surprised that reading $[ does not give a warning:

% perl -E 'use 5.016; use warnings; my $x = $['

I think it would be a good idea to start warning on this - given that the
variable has been deprecated since 5.12, and discouraged since long before that,
and the amount of code that needs to check the value of $[ must be tiny.

Then later on $[ can be removed from the grammar altogether, which will surely
tidy things up and help give better diagnostics for typos like $[0] instead
of $_[0].

Ed Avis <>

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