in reply to Re: strict, scope, my and foreach - not behaving as expected
in thread strict, scope, my and foreach - not behaving as expected
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].
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strict, scope, my and foreach - not behaving as expected
by Abigail-II (Bishop) on Jun 09, 2004 at 14:10 UTC | |
by cfreak (Chaplain) on Jun 09, 2004 at 15:06 UTC | |
by Abigail-II (Bishop) on Jun 09, 2004 at 16:58 UTC | |
by vek (Prior) on Jun 09, 2004 at 21:14 UTC | |
by belden (Friar) on Jun 10, 2004 at 14:24 UTC |