in reply to please, PLEASE use strict!
in thread Running a subroutine a certain number of times
No, use strict would not magically solve the problem. By putting use strict on top of the code, and my $i above the first loop, you would still have had the same problem: the loop variable is still shared.
You solve the problem by putting my $i in the subroutine, or in the inner block. But you don't need use strict to do so.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Please, please don't treat use strict as a magic wand that solves all problems.
by dreadpiratepeter (Priest) on Aug 05, 2002 at 14:45 UTC | |
|
use strict isn't your magic wand, but your spellbook!
by flocto (Pilgrim) on Aug 05, 2002 at 15:04 UTC |