develooper Front page | perl.perl5.porters | Postings from February 2016

Re: [perl #127552] No warning or error on @$

Thread Previous | Thread Next
From:
Zefram
Date:
February 16, 2016 13:14
Subject:
Re: [perl #127552] No warning or error on @$
Message ID:
20160216131351.GF7767@fysh.org
Ed Avis wrote:
>Perl silently accepts an array variable @$

$ perl -lwe '@$ = qw(a b c); print @$'
abc

The array variable works.  Making it an error would be an incompatible
change.  (However, perlvar(1) does describe punctuation variable names
as "reserved".)  If it is to be done, it should probably be done via a
deprecation cycle.

-zefram

Thread Previous | 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