programming-examples/perl/Statement/While statement and scalar control value.pl

11 lines
149 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use strict;
my $countdown = 5;
while ($countdown > 0) {
print "Counting down: $countdown\n";
$countdown--;
}