$a=0; do { print $a++, "\n" } while ($a < 10)
Because it checks the condition at the end, it'll run the loop once through even if the condition is false to begin with (try changing the condition to $a < -10 and you'll see what I mean).
You can find out more in the docs under perlsyn. HTH!
Best wishes, a.
In reply to Re: how to loop
by andye
in thread how to loop
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |