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 :)
In reply to Re^3: lsearch for perl?
by ikegami
in thread lsearch for perl?
by matt.tovey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |