> I don't understand why you're /adding/ the match count $x to the hash value
> each
> time. Is that why you're getting values that you don't expect?
>
> If the first column of your output is supposed to be a count (for that source
> address, connection, or port) then you should be adding one each
Stephen Reese wrote:
> John W. Krahn wrote:
>>
>> Have a look at the sample data you posted and you will see where.
>
> I believe I found where the ']' needs to go but didn't see any extra ' '
> space.
>
> The $x count seems off. As I see it every time a regex match is made then $x
> will increas
> I don't see where you're printing $x to check.
Jay, I probably was not and do not know how to :-).
> Assuming you have actually checked $x, though, the important question
> isn't whether $x == `grep -c regex /your/log/file`.
>
> The important question is whether $x == scalar keys %srca.
>
> If
On Wed, Sep 24, 2008 at 10:55 PM, Stephen Reese <[EMAIL PROTECTED]> wrote:
>> Have a look at the sample data you posted and you will see where.
>>
>>
>> John
>
> I believe I found where the ']' needs to go but didn't see any extra ' '
> space.
>
> The $x count seems off. As I see it every time a re
> Have a look at the sample data you posted and you will see where.
>
>
> John
I believe I found where the ']' needs to go but didn't see any extra ' '
space.
The $x count seems off. As I see it every time a regex match is made then $x
will increase one. The match numbers results are about 5x g
Stephen Reese wrote:
It appears that there is a space (' ') character at the end of the
pattern where there should be a ']' character.
John, I'm missing where the closing bracket should go.
Have a look at the sample data you posted and you will see where.
John
--
Perl isn't a toolbox, but a
> It appears that there is a space (' ') character at the end of the
> pattern where there should be a ']' character.
John, I'm missing where the closing bracket should go.
while () {
next unless
/Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)\s*->
\s*([\d\.]+):(\d
> I just copied over your code and noticed that the end of
> your regular expression (the "/" character) runs across a
> newline. Once I moved that back up to this:
>
> next unless
> /Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)
> \s*->\s*([\d\.]+):(\d+)/;
>
> $x is incr
Stephen Reese wrote:
Dave wrote:
I think the problem might be with your regular expression and not $x.
If your regular expression does not match the current line then every line
will be skipped.
What does the line that is being processed look like?
Here are two lines from the log file.
S
I just copied over your code and noticed that the end of
your regular expression (the "/" character) runs across a
newline. Once I moved that back up to this:
next unless
/Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)\s*->\s*([\d\.]+):(\d+)/;
$x is incremented. I won
> Hello Stephen,
>
> I think the problem might be with your regular expression and not $x.
>
> If your regular expression does not match the current line then every line
> will be skipped.
>
> What does the line that is being processed look like?
>
> Dave
Here are two lines from the log file.
Sep
Hello Stephen,
I think the problem might be with your regular expression and not $x.
If your regular expression does not match the current line then every line
will be skipped.
What does the line that is being processed look like?
Dave
-Original Message-
From: Stephen Reese [mailto:[EM
12 matches
Mail list logo