cutlass2006 has asked for the wisdom of the Perl Monks concerning the following question:
Dear monkists,
I note here that the concept of an automated counter variable in looping structures have been discussed before.
My question is why does this output the current loop count ?
for (1..10){
print
}
could this not be subverted as a loop counter ? tia.
update: slapping forehead: thanks....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl loop counter
by Fletch (Bishop) on Jul 18, 2008 at 15:31 UTC | |
|
Re: perl loop counter
by zentara (Cardinal) on Jul 18, 2008 at 15:38 UTC | |
by friedo (Prior) on Jul 18, 2008 at 15:56 UTC | |
by almut (Canon) on Jul 18, 2008 at 16:20 UTC | |
by zentara (Cardinal) on Jul 18, 2008 at 16:22 UTC | |
by massa (Hermit) on Jul 18, 2008 at 16:39 UTC |