This part:
foreach $i (@f) { @e = grep {$_ % $i != 0} @n; @n = (); @n = @e; }
could be shortened as:
@n = grep {$_ % $i != 0} @n foreach $i (@f);
No it cannot because the statement modifier foreach does not support the syntax foreach $i (@f), it only works as foreach @f with $_ as the current element.
In reply to Re^2: What am I missing?
by jwkrahn
in thread What am I missing?
by neo_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |