Re: perl cumulative module question

2008-11-27 Thread ben perl
Thanks Everyone!! This should help. On Sat, Nov 22, 2008 at 9:17 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Rob Dixon wrote: > > > > Your arithmetic is odd. You say > > > > 9-4 = 2 > > > > and so your resulting list should be (2,4,2). If you want to subtract the > > previous result from the ne

Re: perl cumulative module question

2008-11-22 Thread Rob Dixon
Rob Dixon wrote: > > Your arithmetic is odd. You say > > 9-4 = 2 > > and so your resulting list should be (2,4,2). If you want to subtract the > previous result from the next item in your data list each time then this will > do > the job. > > HTH, > > Rob > > > use strict; > use warnings;

Re: perl cumulative module question

2008-11-22 Thread Rob Dixon
ben perl wrote: > Is there a perl module to find cumulative in a column? It should subtract > from the previous row and creates new column. > > For example, If i have the follow column in my file > > 2 > 6 > 9 > > It gives me > > 2 > 6-2 = 4 > 9-4 = 2 > > So the resulting column is > > 2 > 4

Re: perl cumulative module question

2008-11-22 Thread Jay Savage
On Sat, Nov 22, 2008 at 10:28 AM, ben perl <[EMAIL PROTECTED]> wrote: > Is there a perl module to find cumulative in a column? It should subtract > from the previous row and creates new column. > > For example, If i have the follow column in my file > > 2 > 6 > 9 > > It gives me > > 2 > 6-2 = 4 > 9