[Sophisticated Searches]

Fraser Campbell fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org
Thu Dec 18 19:09:28 UTC 2003


On Thursday 18 December 2003 13:39, Henry Spencer wrote:

> that's aware of Internet addresses and can manipulate them as such.  I'm
> sure somebody's got a library for that in Perl...

Net::IPv4Addr ...

use Net::IPv4Addr qw( :all );
$logline = 'asdf 43tr gerag fdgdgf 34.23.45.222';
if ($ip = ipv4_checkip($logline) ) {
    print "$ip\n";
}

-- 
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org>                 http://www.wehave.net/
Georgetown, Ontario, Canada                         Debian GNU/Linux

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list