|P is for Practical|
adding items, but with interim resultsby kontrapunktstefan (Initiate)
|on Mar 30, 2013 at 14:55 UTC||Need Help??|
kontrapunktstefan has asked for the
wisdom of the Perl Monks concerning the following question:
Dear community, I would like to do with an arry like e.g.
@array = qw (0 1 3 2 ) ;
I would like to calculate the sums of all the items, but with interim results.
I would like to get another array consisting of the all these interim results, in this special case:
@newarray = qw ( 0 1 4 6 ); #0+1, 1+3, 3+2
How can I do this?
I thank You for Your patience, it's one of my very first steps I do with perl-