SPUG: Grep syntax

Yitzchak Scott-Thoennes sthoenna at efn.org
Sat Jun 16 22:56:37 PDT 2007

On Sat, June 16, 2007 12:39 am, Shawn W. wrote:
> I suspect a lot of perl users don't  have a great deal of familiarity
> with functional languages where list processing is emphasized than it is in
> perl -- lisp, scheme, the MLs, and so on.  map, filter/grep, and one that
> perl's missing as a built-in -- fold (which can be used to create pretty
> much any other list function) are used all over the place in those
> languages.

What would a perl equivalent of fold look like?

A lot of useful stuff in perl isn't built in.  The core module
List::Util is invaluable.  From CPAN, there's lots of handy things
in Algorithm::Loops and List::MoreUtils.

More information about the spug-list mailing list