Your second "foreach" is not necessary.
I think the OP is trying to do this with the second foreach:
for(my $i=1; $i < @array; $i++){ print "The difference is ", $array[$i] - $array[$i-1], "\n"; }
In reply to Re^2: simplish script (I think)
by jeffenstein
in thread simplish script (I think)
by notoriousrab430
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |