Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://774186]
help
Chatterbox?
[thezip]: .oO( "A Well-Tempered Database" ? )
[Corion]: I'd like a well-tempered tuning
[Corion]: thezip: :D
[erix]: haha
[thezip]: Perhaps one of the most obnoxious things on earth is a poorly tuned piano. I will not even listen to one.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-11-17 19:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (270 votes). Check out past polls.

    Notices?