Dru has asked for the wisdom of the Perl Monks concerning the following question:
use warnings; my $file = 'd:\temp\tcp.txt'; my $ignore = qr(192\.168\.188\.3|192\.168\.11\.141|192\.168\.140\.110 |192\.168\.186\.192|192\.168\.186\.166|192\.168\.139\.50 |192\.168\.139\.198|192\.168\.132\.101); open (FILE, $file) or die "Can not open $file: $!\n"; while (<FILE>){ ($src) = (split /;/)[10]; print if ($src !~ /$ignore/); } close FILE
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not Matching String is Matching
by Mr. Muskrat (Canon) on Aug 16, 2003 at 14:35 UTC | |
by Dru (Hermit) on Aug 16, 2003 at 15:07 UTC | |
|
Re: Not Matching String is Matching
by cchampion (Curate) on Aug 16, 2003 at 15:20 UTC | |
by PodMaster (Abbot) on Aug 17, 2003 at 09:02 UTC | |
|
Re: Not Matching String is Matching
by antirice (Priest) on Aug 16, 2003 at 20:12 UTC | |
|
Re: Not Matching String is Matching
by NetWallah (Canon) on Aug 16, 2003 at 19:06 UTC | |
by Anonymous Monk on Aug 16, 2003 at 19:11 UTC | |
|
Re: Not Matching String is Matching
by halley (Prior) on Aug 18, 2003 at 13:40 UTC |