in reply to Re: Matching IP address continued
in thread Matching IP address continued
This file is a direct dump of data I am looking at.
My snippet of code looks like:
... # Setup our IP matching regex my $re_ip = qr/(\d+\.\d+\.\d+\.\d+):\d+/; my $re_test = qr/^\s*$re_ip\s*->\s*$re_ip\s*->\s* $re_ip/x; my $re_line = qr/ ^ \s* $re_ip \s* -> \s* $re_ip \s* -> \s* $re_ip /x; ... # Reset data my @connections = `bigpipe conn dump`; ... foreach my $line (@connections) { print "$line\n" if ($line =~ /$re_test/); $vip{$2}{'conn_count'}++ if ($line =~ /$re_line/); }
The print statement works as expected; the increment does not. The increment counter works immediately if I change it to if ($line =~ /$re_test/);
Thanks again for all the help.
<-> In general, we find that those who disparage a given operating system, language, or philosophy have never had to use it in practice. <->
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Matching IP address continued
by BrowserUk (Patriarch) on Nov 20, 2002 at 19:32 UTC | |
by ibanix (Hermit) on Nov 20, 2002 at 23:00 UTC | |
by BrowserUk (Patriarch) on Nov 21, 2002 at 00:27 UTC |