derek3000 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; my $file = 'aFile'; my $hash_ref = get_hash($file); #blah blah blah sub get_hash{ my $file = shift; my %hash; #do something to populate a hash return \%hash; }
if %hash is scoped in that block, doesn't it die after it leaves the block? If that's true, wouldn't $hash_ref point to nothing? Just kind of curious.
Thanks,
Derek
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid - reference counts) Re: a general question on references...
by Ovid (Cardinal) on Jul 18, 2001 at 23:46 UTC | |
|
Re: a general question on references...
by TheoPetersen (Priest) on Jul 18, 2001 at 23:41 UTC | |
|
Re: a general question on references...
by lhoward (Vicar) on Jul 18, 2001 at 23:43 UTC |