The while and until Statements

while ( condition )

{   do this  }

until ( condition )

{   do this  }


do while and do until Loops

do while

do { statements }

while (some_condition);


do until

do { statements }

until (some_condition);


The for and foreach Loops

for loop

for (initialize;  test condition;  increment)

{  statements ;}


foreach loop

foreach $item (@list)

{ statements; }