17 lines
338 B
Perl
17 lines
338 B
Perl
|
#With until, the block is repeated so long as the condition remains false.
|
||
|
#You can read the command as "loop until the condition is true."
|
||
|
#You can reverse the while test with the until statement:
|
||
|
|
||
|
#until (condition) {
|
||
|
# # ...
|
||
|
#}
|
||
|
|
||
|
|
||
|
#!/usr/bin/perl -w
|
||
|
|
||
|
$i = 0;
|
||
|
until ($i >= 10) {
|
||
|
print "Iteration $i.\n";
|
||
|
|
||
|
$i++;
|
||
|
}
|