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,
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, LOG line 1. ??
Break it
--- 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.
Isn't
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 = '';
--- 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 $v;for(1..3) { print
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 for
, 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 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
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 by someone who hasn't a
clue about programming.
I have
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
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 someone who hasn't
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
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 misread
Rmck wrote:
Im trying to sum up a column from my results. Help.
job specification snipped
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
: 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.
job specification snipped
Im stuck.
I don't believe you. To be stuck, you need to try first, and I suspect
that you
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,
15 matches
Mail list logo