Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: split split

by artist (Parson)
on Jun 23, 2009 at 21:56 UTC ( #774186=note: print w/ replies, xml ) Need Help??


in reply to split split

If you really need the 'ip address', you can use the right expression.

use Regexp::Common qw/net/; + my $ip_regexp = qr($RE{net {IPv4}); + while(<DATA>) { + if (/($ip_regexp)/) { + my $ip_address = $1; + print "$ip_address\n"; + } + } + + __DATA__ + client 127.0.0.1#47560: query: host.example.com IN AAAA +
--Artist


Comment on Re: split split
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://774186]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2015-07-05 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls