http://qs321.pair.com?node_id=745922


in reply to Re: (Mis)Understanding <c>grep...eq $_<c>
in thread (Mis)Understanding grep...eq $_

It makes no sense to use it on scalars.
Hey, that's not such a bad idea. For conditional inclusion in lists, instead of something like:
@foo = ( ... ( $include_bar ? 'bar' : () ) ... );
you'd have
@foo = ( ... grep( $include_bar, 'bar' ) ... );