go ahead... be a heretic | |
PerlMonks |
Re^2: strict, scope, my and foreach - not behaving as expectedby wolv (Pilgrim) |
on Jun 09, 2004 at 13:18 UTC ( [id://362722]=note: print w/replies, xml ) | Need Help?? |
Modifying the program is not inherently harmful, and in my opinion, modifying code that does not run under strict is usually a good idea. Not that all programs should be made to run under strict, but the fact is that it prevents a lot of subtle bugs that might not come up in normal debugging at all. As to the problem in the original question, I'd like to ask 'why' too; why make the iteration variable global? Call-by-value is really not that expensive, and if you feel it is, use $_[0].
In Section
Seekers of Perl Wisdom
|
|