programming-examples/perl/Statement/The until statement.pl

17 lines
338 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#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++;
}