in reply to Re: Re: Error msg "requires explicit package name"
in thread Error msg "requires explicit package name"
"my" variable $i masks earlier declaration in same scopeThe reason you may see it more than once on the same variable is because the variable is being created new every time. For example:
uses two completely different $i variables that happen to have the same name, because the scope of $i is only inside the loop.for(my $i=0;$i<10;$i++) { print $i,"\n"} for(my $i=9;$i>=0;$i--) { print $i,"\n"}
Maybe that just confused you more, but hope it's helpful! :-)
|
|---|