MC logo

While Loop

  Code Examples

<<The Strict Pragma while.pl Echo I>>
use strict;

my $a = 5;
while($a > 0) {
    print "$a ";
    $a--;
}
print "\n";
<<The Strict Pragma Echo I>>