I personally believe that
@y = map { condition($_) ? $_ : () } @x;
is generally spelt
@y = grep { condition($_) } @x;
Of course, you have the condition reversed, but then a ! would do, and I doubt it would impose a considerable penalty in terms of efficience.
In reply to Re^2: Subtracting Lists
by blazar
in thread Subtracting Lists
by JimSki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |