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



The while/until Structures

The while structure is equivalent to the while structures in Java, C, or C++. The code executes while the expression remains true.

     use strict;
     while (expression) {
         While_Statement;
         While_Statement;
         While_Statement;
     }
     

The until (expression) structure is functionally equivalent while (! expression).