programming-examples/perl/Statement/while and until loop.pl

21 lines
285 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!C:/perl/bin
$loopcounter = 1;
while ($loopcounter < 10)
{
print "loop count = $loopcounter ";
$loopcounter++
}
$loopcounter = 1;
print "\n\nThe Until Loop:\n";
until ($loopcounter > 10)
{
print "loop count = $loopcounter ";
$loopcounter++
}