You could do this if you just want less typing:
foreach my $i ( $from .. $to ) { next if ($i % 2 || $i % 3 || $i % 4 || $i % 5); say $i; }
Or did you want some programmatic way to represent the range of mod arguments?
In reply to Re: if ... elsif ... else
by hippo
in thread if ... elsif ... else
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |