I can't tell what your field separator is (space or tab) and if the IP is always at the same position.
So try @fields = split /\t/, $line and print $line if grep { your_test($_) } @fields ( tab separator, IP position unclear)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
In reply to Re: How to grep matching IP address from a log file?
by LanX
in thread How to grep matching IP address from a log file?
by dotowwxo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |