Node:The do while/until Structures, Next:, Previous:The while/until Structures, Up:Control Structures



The do while/until Structures

The do/while structure works similar to the while structure, except that the code is executed at least once before the condition is checked.

     use strict;
     do {
         DoWhile_Statement;
         DoWhile_Statement;
         DoWhile_Statement;
     } while (expression);
     

Again, using until (expression) is the same as using while (! expression).