in reply to performing a function on corresonding array elements
Algorithm::Loops also handles parallel looping wonderfully:
use Algorithm::Loops qw( MapCarU ); use List::Util qw( sum ); my @items = map { $_->{items} } @sets; my @totals = MapCarU { sum( @_ ) } @items;
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: performing a function on corresonding array elements (w/o temp)
by tye (Sage) on Apr 03, 2006 at 18:23 UTC | |
by diotalevi (Canon) on Apr 03, 2006 at 18:26 UTC |