in reply to Re: how to select which words have Y and W
in thread how to select which words have Y and W

Of course it's possible, just place a conditional in the grep.

$ perl -Mstrict -Mwarnings -E ' my @array = ( 12, -85, 36, -10, 75, -38 ); say qq{@array}; my @notNegatives = grep { $_ >= 0 } @array; say qq{@notNegatives};' 12 -85 36 -10 75 -38 12 36 75 $

I hope this is helpful.

Cheers,

JohnGG