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
is this a "wrongly" used grep? Should I be writing something like-do_something() if (grep /something/, @array);
... the grep seems easier on the eye IMO. Is it OK if you know the data source is always going to be small?foreach (@array){ &do_something() and last if /something/; }
In Section
Seekers of Perl Wisdom