rchiav has asked for the wisdom of the Perl Monks concerning the following question:
If you do the following..
Now is it safe to use what's at $ref? I've used Data::Dumper to view data refrenced by a returned refrence but just because it's there now, doesn't mean that it's going to be there later. So, can anyone share with me the rules about when data becomes "freed"?my $ref = CreateRef(); sub CreateRef { my %some_hash = ('foo' => 'bar'); return \%some_hash; }
Thanks,
Rich
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variables living outside their scope
by merlyn (Sage) on May 01, 2001 at 05:30 UTC | |
|
Re: Variables living outside their scope
by jbert (Priest) on May 01, 2001 at 16:31 UTC | |
by ozzy (Sexton) on May 01, 2001 at 17:03 UTC | |
|
Re: Variables living outside their scope
by Dominus (Parson) on May 01, 2001 at 19:26 UTC |