hi,

i want to be able to read a text file and extract only the valid
ip addresses. however, along with valid ip addresses my code is
grabbing "periods" and invalid ip addresses, e.g., .xxx,
www.xxx.yyy . how can i correct this?

=====
while (<inFILE>) {
   chomp;
   if (($L) = ($_) =~ m/\b([0-9.0-9.0-9.0-9]+)\b/ ) {
      print $L, "\n";
   }
   #etc... 
}

#etc...
=====


tia,
Bill

Reply via email to