in reply to Re^2: lsearch for perl?
in thread lsearch for perl?
Things like this aren't in the man-page
grep accepts any code in the block. It doesn't have to be a regex. grep is useful for filtering out items from a list, while map is useful for transforming a list.
The idea of using grep on a list without naming _that_ list as the argument to grep would never have occurred to me.
It's an concept I picked up on PerlMonks too :)
|
|---|