programming-examples/perl/Statement/Print out even numbers with a do...while loop.pl
2019-11-15 12:59:38 +01:00

13 lines
145 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
my $n = 0;
do {
{
next if ($n % 2);
print $n, "\n";
}
} while ($n++ < 10);