List::Util
use
List::Util
qw(reduce)
;
my
$result
= reduce { BLOCK }
@list
;
my
$sum
= reduce {
$a
+
$b
}
1
..
10