Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Understanding why strict prevents a use of localby c (Hermit) |
on Oct 19, 2001 at 22:42 UTC ( [id://120107]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
My code:
when i take use strict; out of the equation, the second subroutine prints out the value of $i for each iteration of the foreach loop. however, useing strict causes perl to complain about needing a global declaration for $i. could someone explain this one to me? humbly -c
Back to
Seekers of Perl Wisdom
|
|