http://www.perlmonks.org?node_id=689718


in reply to Re: Subtracting Lists
in thread Subtracting Lists

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.

--
If you can't understand the incipit, then please check the IPB Campaign.