http://qs321.pair.com?node_id=1214704


in reply to Abusing Map

I'm surprised nobody mentioned reduce yet.

Have a look a List::Util and/or List::MoreUtils

update

Sorry reduce is wrong (it returns a scalar) but close ...

update

we had similar discussions before, but I was only able to find "reduce like iterators" yet

Too tired to look further.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery