Syntactic Confectionery Delight | |
PerlMonks |
Re^3: Perl variable scoping between functionsby choroba (Cardinal) |
on Jul 18, 2018 at 11:34 UTC ( [id://1218740]=note: print w/replies, xml ) | Need Help?? |
The variable $modules declared in MAIN is shadowed by the lexical $modules declared inside the function. To properly pass parameters to @_, put them into the parameter list:
@other will be empty, as fLoadModules doesn't return anything, but that's already been covered in other replies.
In Section
Seekers of Perl Wisdom
|
|