Perl: the Markov chain saw | |
PerlMonks |
Does Scope of Referenced Array Matter?by NOYB (Novice) |
on Feb 19, 2012 at 22:25 UTC ( [id://954930]=perlquestion: print w/replies, xml ) | Need Help?? |
NOYB has asked for the wisdom of the Perl Monks concerning the following question:
Since the array is declared using the 'my' keyword, could the array reference be lost if/when the array itself falls out of scope? I know this example script functions, but is it just happenstance? Or will the reference prevent the array itself from vaporizing when/if it falls out of scope? Or should the array be declared without using the 'my' keyword? Thanks, This is me. And I wouldn't lie about a thing like that. - Paraphrased from MASH dialog.
Back to
Seekers of Perl Wisdom
|
|