programming-examples/perl/Statement/if in a while loop.pl

10 lines
159 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$i=1;
while ($i <= 10){
if ($i==5){
print "\$i == $i\n";
$i++;
next;
}
print "$i ";
$i++;
}