Welcome to the Monastery | |
PerlMonks |
Legitimate use for combined 'local' and 'our'by jeteve (Pilgrim) |
on Nov 15, 2010 at 10:41 UTC ( [id://871437]=perlquestion: print w/replies, xml ) | Need Help?? |
jeteve has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monks,
A question stroke me recently, what could be a legitimate use of both 'local' and 'our' on a variable in a package? I wrote the following code to try to figure it out:
It prints 'Blabla' twice and removing the 'local' on $V doesn't make any difference. Can you think about any situation where local-izing an 'our' variable could be useful? -- Jerome Eteve
Back to
Seekers of Perl Wisdom
|
|