Perl's C-style for loop works like the corresponding while loop; that means that this:is the same as this:for ($i = 1; $i < 10; $i++) { ... }$i = 1; while ($i < 10) { ... } continue { $i++; }
NB I have to admit I practically never use continue ...
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^2: Not understanding while loop counting
by LanX
in thread Not understanding while loop counting
by zapdos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |