Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: scoping across parent/child relationshipby rchiav (Deacon) |
on Aug 30, 2001 at 21:17 UTC ( [id://109136]=note: print w/replies, xml ) | Need Help?? |
my ( $foo, %bar, $bax ); is scoped within the else. It doesn't look like Initialize_child exists within that scope. I think there are two options, of which I think only one would be recomended.
1) pass the variables to the sub (recomended) Just to further explain, here's some example code that will give you the same results. Or if it existed inside the scope (not recomended, just for demonstrative purposes) Hope this helps Rich
In Section
Seekers of Perl Wisdom
|
|