Using the do/while repetition structure : Do While « Statement « Perl






Using the do/while repetition structure


$counter = 1;

do 
{
   print "$counter ";
} while ( ++$counter <= 10 );

print "\n";

 








Related examples in the same category

1.Do .. while statement
2.Print out even numbers with a do...while loop
3.A do statement.
4.The do/while and do/until Loops