Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 surveying the Monastery: (9)
As of 2014-07-28 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (195 votes), past polls