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"; }
In reply to Re: Not understanding while loop counting
by pDaleC
in thread Not understanding while loop counting
by zapdos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |