Do .. while statement : Do While « Statement « Perl






Do .. while statement



#!/usr/bin/perl -w

use strict;

my $i = 1;

print "starting do...while:\n";
do {
    print "    the value of \$i: $i\n";
    $i++;
} while ($i < 6);

 








Related examples in the same category

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