Mega Code Archive

 
Categories / Perl / Statement
 

The until statement

#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++; }