This is not right. In perl561delta it's called a known bug/problem, in perl580delta it's called deprecated behaviour. See http://www.perldoc.com/perl5.6.1/pod/perldelta.html#Arrow-operator-and-arrays and http://www.perldoc.com/perl5.8.0/pod/perldelta.html#Deprecations. This is because it's not "supposed" to work. Just as you don't do %foo->{key}. The correct way is to just skip the %{}, or use ${} and emit the second arrow. $ref->hash1->{'two'} = 'twosdata'; or ${$ref->hash1}{'two'} = 'twosdata'; But personally I definately prefer the first way.
ihbIn reply to Re: Re: passing object references into subs
by ihb
in thread passing object references into subs
by Avox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |