use strict; use warnings; my @array = qw ( 0 1 3 2 ); my @newarray; for (@array) { push @newarray, $newaaray[-1]+$_; #will probably bug for $array[0] }
In reply to Re: adding items, but with interim results
by jms53
in thread adding items, but with interim results
by kontrapunktstefan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |