On Sun, Jun 6, 2010 at 09:37, Shawn H Corey <shawnhco...@gmail.com> wrote:
> On 10-06-06 09:06 AM, Chas. Owens wrote:
>>
>> But that is not the problem; autovivification will create the references:
>>
>> perl -MData::Dumper -le '$c->[0]{a}; print Dumper $c'
>>
>
> But that is the problem.  Autovivification should not happen for r-values,
> only l-values.
snip

Hmm, I don't know if I agree with statement and right or wrong I
wouldn't expect the behavior to change anytime soon as it would
definitely break existing code.  It looks like Perl 6 will [do it the
way you want][1] though.

[1] : http://perlcabal.org/syn/S09.html#Autovivification

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to