> > while (<TXT>) { > > > > /^((2[0-5]{2}|1\d{2}|[1-9]\d|[1-9])\.((2[0-5]{2}|1\d{2}|[1-9]\d|\d)\.){2}(2[0-5]{2}|1\d{2}|[1-9]\d|\d))(\s*(port|:|\s|<\/td>\s*<td[^>]+>)\s*)([2-9]\d|[1-9]\d{2,3}|[1-5]\d{4}|6[0-4]\d{3}|654\d{2}|655[0-2]\d|6553[0-5])$/g; > > ip = $1; > > port = $8; > > push(@ip,"$ip,$port); #for example > > }
For theose "less inclined" to work with such a R/E - This module accepts valid IP Addresses: http://search.cpan.org/~frajulac/Net-IPv4Addr-0.10/IPv4Addr.pm if ($ip = ipv4_checkip($str) ) { # Do something } -- WC -Sx- Jones http://youve-reached-the.endoftheinternet.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>