Next statement with if statement : Next « Statement « Perl






Next statement with if statement

  

@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";
}

   
    
  








Related examples in the same category

1.Using the next statement in a foreach structure.
2.Next statement
3.Next if
4.Going onto the Next
5.A word-counting program that uses the next statement.
6.Using both next and continue
7.next with condition