in reply to Re: Dangling Pointer::perl referrence
in thread Dangling Pointer::perl referrence
Thanks for your reply. From the example you given, it means that the referrence will keep the array alive unless I destroy the referrence too (as below)
But what if I use like belowmy $ref; { my @array = 'element'; $ref = \@array; }
{ my @array = 'element'; } $ref = \@array; print "$ref\n";
OR
In both this case I get a output like below$ref=\@arr; #### @arr doesn't excist at all print "$ref\n";
ARRAY(0x1830614)
Now where it's referring too? There is no such variable ... means no such memory location?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dangling Pointer::perl referrence
by ikegami (Patriarch) on Feb 18, 2010 at 01:46 UTC | |
|
Re^3: Dangling Pointer::perl referrence
by jethro (Monsignor) on Feb 18, 2010 at 00:14 UTC |