in reply to Extracing (and excluding) IP's from a file
Current Output:open (OUTDATA, ">> $vfile2"); open (GETDATA, "$vfile"); my $vfiler0 = 0; my $vfiler = 0; while(<GETDATA>) { chomp; if(/^\s*$/) { $vfiler = 0; } if(/vfiler0/) { $vfiler = 1; } if (!$vfiler && m/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1 +,3})/) { my $ip=$1; print OUTDATA "$ip\n"; } }
Thanks!10.42.156.16 10.42.156.19 10.42.156.18 123.123.123.123 123.124.123.123 123.123.123.123 123.124.123.123
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extracing (and excluding) IP's from a file
by sporesbash (Initiate) on Nov 09, 2010 at 14:14 UTC |