|Syntactic Confectionery Delight|
Re: adding items, but with interim resultsby LanX (Canon)
|on Mar 30, 2013 at 17:20 UTC||Need Help??|
please clarify your question!
> I would like to calculate the sums of all the items, but with interim results.
> @newarray = qw ( 0 1 4 6 ); #0+1, 1+3, 3+2
where you are calculating only the sum of neighboring pairs, not all items (see 3+2)!
two different tasks, you got quite good answers for both.
( addicted to the Perl Programming Language)