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

Deprecation warning for reading $[

Thread Next
From:
Ed Avis
Date:
March 1, 2013 13:06
Subject:
Deprecation warning for reading $[
Message ID:
loom.20130301T140335-263@post.gmane.org
I was surprised that reading $[ does not give a warning:

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

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 <eda@waniasset.com>


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About