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
In reply to a general question on references... by derek3000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |