- or download this
#!/usr/bin/perl -w
use strict;
...
Prints:
part1: client 127.0.0.1
ipaddr: 127.0.0.1
- or download this
(undef, my $ipaddr) = split(/\s+/, $part1);
- or download this
my $line = 'client 127.0.0.1#47560: query: host.example.com IN AAAA';
...
__END__
prints:
127.0.0.1