http://qs1969.pair.com?node_id=63460


in reply to (tye)Re: playing with map
in thread playing with map

So using grep to return something other than a subset of the original list is quite restricted and is probably an indication that you shouldn't be using grep. (:

I have been guilty of writing

do_something() if (grep /something/, @array);
is this a "wrongly" used grep? Should I be writing something like-
foreach (@array){ &do_something() and last if /something/; }
... the grep seems easier on the eye IMO. Is it OK if you know the data source is always going to be small?