in reply to Not understanding while loop counting
But I would suggest using the exact loop style for this situation:$count = 0; while (++$count < 10) { print "count is now $count\n"; }
For ($count=1; $count<10; ++$count) { print "count is now $count\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Not understanding while loop counting
by haukex (Archbishop) on Aug 10, 2020 at 15:09 UTC | |
|
Re^2: Not understanding while loop counting
by LanX (Saint) on Aug 10, 2020 at 16:34 UTC |