sum a column

2004-09-30 Thread rmck
Hello, Im trying to sum up a column from my results. Help. current output: Date_Time, SRCIP, DSTIP, TOTALBYTES 01-01-2004 12:56:48, 192.168.1.1, 192.168.2.2, 2768 Sum Of Bytes = 2768 01-01-2004 12:56:48, 192.168.2.2, 192.168.1.1, 438 Sum Of Bytes = 876 01-02-2004 16:49:45, 192.168.3.3, 192.168.

Re: sum a column

2004-09-30 Thread Gunnar Hjalmarsson
Rmck wrote: Im trying to sum up a column from my results. Help. Im stuck. I don't believe you. To be stuck, you need to try first, and I suspect that you didn't do that. Note that this is not a free service for modifying scripts that people pick up somewhere. I suggest that you make a serious a

Re: sum a column

2004-09-30 Thread rmck
: Gunnar Hjalmarsson <[EMAIL PROTECTED]> Sent: Sep 30, 2004 5:21 PM To: [EMAIL PROTECTED] Subject: Re: sum a column Rmck wrote: > Im trying to sum up a column from my results. Help. > Im stuck. I don't believe you. To be stuck, you need to try first, and I suspect that you did

Re: sum a column

2004-09-30 Thread Wiggins d Anconia
> Hello, > > Im trying to sum up a column from my results. Help. > > current output: > Date_Time, SRCIP, DSTIP, TOTALBYTES > 01-01-2004 12:56:48, 192.168.1.1, 192.168.2.2, 2768 > Sum Of Bytes = 2768 > 01-01-2004 12:56:48, 192.168.2.2, 192.168.1.1, 438 > Sum Of Bytes = 876 > 01-02-2004 16:49:45,

Re: sum a column

2004-10-01 Thread Gunnar Hjalmarsson
Rmck wrote: Are you serious. Indeed. Im not sure how to sum up the column... I tried by using the field and * it by the increment. That awkward attempt seems to be made by someone who hasn't a clue about programming. I have written every part of my script, The script author does have a clue abo

Re: sum a column

2004-10-01 Thread rmck
EMAIL PROTECTED] Sent: Friday, October 01, 2004 2:53 AM To: [EMAIL PROTECTED] Subject: Re: sum a column Rmck wrote: > Are you serious. Indeed. > Im not sure how to sum up the column... I tried by using the field > and * it by the increment. That awkward attempt seems to be made by some

Re: sum a column

2004-10-01 Thread Gunnar Hjalmarsson
Rmck wrote: Gunnar Hjalmarsson wrote: Rmck wrote: Im not sure how to sum up the column... I tried by using the field and * it by the increment. That awkward attempt seems to be made by someone who hasn't a clue about programming. I have written every part of my script, The script author does have a

RE: sum a column

2004-10-01 Thread West, William M
> >But I didn't say that about the script author, and you claim to be the >script author, so what's the problem? > >-- >Gunnar Hjalmarsson >Email: http://www.gunnar.cc/cgi-bin/contact.pl looks like a communications problem... "The script author does have a clue about programming." is easy to

RE: sum a column

2004-10-02 Thread rmck
4 12:02 PM To: [EMAIL PROTECTED] Subject: Re: sum a column Rmck wrote: > Gunnar Hjalmarsson wrote: >> Rmck wrote: >>> Im not sure how to sum up the column... I tried by using the >>> field and * it by the increment. >> >> That awkward attempt seems to be made

Re: sum a column

2004-10-04 Thread rmck
77 Thank You. Rob -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 5:32 PM To: rmck; [EMAIL PROTECTED] Subject: Re: sum a column > Hello, > > Im trying to sum up a column from my results. Help. > > current out

RE: sum a column

2004-10-05 Thread Charles K. Clarkson
rmck <[EMAIL PROTECTED]> wrote: Please stop top posting. : I had to add a "print $sum !=" to inside and outside the : while loop. Im not sure why it is working this way?? Also : Im getting an error "Use of uninitialized value in string : ne at ./clean1.pl line 28, line 1." ?? Break it d

RE: sum a column

2004-10-05 Thread Denzil Kruse
--- "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: [snip] > > my $prev_date; > if ( $prev_date ne 'foo' ) {## LINE 28 ## > print 'foo'; > } > > Since prev_date does not have value, it cannot > be compared > without raising a warning. On the second pass > $prev_date has > a value.

Re: sum a column

2004-10-05 Thread JupiterHost.Net
my $prev_date; if ( $prev_date ne 'foo' ) {## LINE 28 ## print 'foo'; } Since prev_date does not have value, it cannot be compared without raising a warning. On the second pass $prev_date has a value. Isn't $prev_date assigned to '', and isn't that It is if you do my $prev_date = ''; bu

Re: sum a column

2004-10-05 Thread Denzil Kruse
--- "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: > > Isn't $prev_date assigned to '', and isn't that > > It is if you do > my $prev_date = ''; > but > my $prev_date; > it is "uninitialized" as in it hasn't been assigned > any value incuding > "empty" > > Compare > perl -mstrict -we 'my $

Re: sum a column

2004-10-05 Thread JupiterHost.Net
Compare perl -mstrict -we 'my $v;for(1..3) { print "$v\n";$v++; }' with perl -mstrict -we 'my $v = "";for(1..3) { print "$v\n";$v++; }' Hmm, I could swear I read in my manual that perl will automatically initialize variables. But, that's obviously not case, as your example demonstrates. Thanks

Re: sum a column

2004-10-06 Thread John W. Krahn
rmck wrote: Hello, Hello, Im trying to sum up a column from my results. Help. current output: Date_Time, SRCIP, DSTIP, TOTALBYTES 01-01-2004 12:56:48, 192.168.1.1, 192.168.2.2, 2768 Sum Of Bytes = 2768 01-01-2004 12:56:48, 192.168.2.2, 192.168.1.1, 438 Sum Of Bytes = 876 01-02-2004 16:49:45, 192.