in reply to How to grep matching IP address from a log file?
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
|
|---|