If I import Module A and Module B into my program, their variables are now accessible to the current package without having to name them (e.g. $ModuleA::x). But what happens if Module A and Module B both a variable or subroutine with the same name? Let's say there is a &ModuleA::function and a &ModuleB::function and I call function(); from my program. How will my program know which function() subroutine to call?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot";
$nysus = $PM . $MCF;
In reply to Avoiding variable conflict when importing modules by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |