Using do .. until statement : Do Until « Statement « Perl






Using do .. until statement




#!/usr/bin/perl -w

use strict;

my $i = 1;

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

 








Related examples in the same category

1.Using the do/until repetition structure