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
In reply to Variables living outside their scope by rchiav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |