in reply to Re: Re: resolving ip's to names in a text file
in thread resolving ip's to names in a text file

Taking the regex out of RE: Matching an IP address, which is from the MRE book, with a few small modifications, came up with this.
my @ips = ($string =~ m/((?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d +?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2 +[0-4]\d|25[0-5]))/g);
Now @ips will have an array full of IP's, if they are valid or not is another discussion...