jabowery has asked for the wisdom of the Perl Monks concerning the following question:
It, as expected, outputs:$h->{bar}=1; print "$h $$h{bar}\n";
Then consider the code:HASH(0x7fefc8) 1
Although the code is somewhat nonsensical, it outputs the expected:$h->{bar}=1; $h='foo'; print "$h $$h{bar}\n";
What I want to know is where I can look in the perl docs to predict this behavior:foo
Which outputs what more devout perl monks than I undoubedly expect:$h='foo'; $h->{bar}=1; print "$h $$h{bar}\n";
foo 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Implicit Reference Assignment Surprisingly Doesn't Overwrite Prior Scalar
by Tanktalus (Canon) on May 05, 2014 at 04:20 UTC | |
by jabowery (Beadle) on May 05, 2014 at 05:50 UTC | |
|
Re: Implicit Reference Assignment Surprisingly Doesn't Overwrite Prior Scalar
by choroba (Cardinal) on May 05, 2014 at 07:43 UTC |