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


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

Try this:
$ perl -e '@positive_int = grep {$_ >=0 } (12,-85,36,-10,75,-38); pri +nt "@positive_int"' 12 36 75