programming-examples/perl/Statement/Next statement with if statement.pl

11 lines
178 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
@a = (0 .. 20);
@b = (-10 .. 10);
DIVISION: while (@a) {
$a = pop @a;
$b = pop @b;
next DIVISION if ($b == 0);
print "$a / $b = " . $a / $b . "\n";
}