programming-examples/perl/Statement/The do-while and do-until Loops.pl

14 lines
165 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
$x = 1;
do {
print "$x ";
$x++;
} while ($x <= 10);
print "\n";
$y = 1;
do {
print "$y " ;
$y++;
} until ($y > 10);