|
|
| Don't ask to ask, just ask | |
| PerlMonks |
do until loopsby root (Scribe) |
| on Nov 05, 1999 at 04:59 UTC ( #951=perltutorial: print w/ replies, xml ) | Need Help?? |
|
These work the same as do while loops only they execute until the condition evaluated is true
Here's a quick example:
$value=5;
do{
print "$value\n";
$value=$value-1;
} until($value<=10);
This is executes once and prints out $value; 5 Then $value is decremented and becomes 4 since 4<=10 is true execution of the loop is terminated Now onto the exciting world of for loops
Back to
Tutorials
|
|
||||||||||||||||||||||||||||||||||