If I do a for loop in a subroutine, do I have to declare it private
with my()? I always though for() did that for me, but I ran into a bug
where code like this:

sub foo {for $i (1..2) {print $i;}}

affected my global $i (I think). Or was I imagining it?

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to