I would like to extract all messages that pertain to a particular IP address from a logfile, using the IP address as an argument. This seems like it should be easy to do, but as a newbie to perl I am stumped. The logfile looks like this...
Sent:
Host=199.199.199.199
Filename=xxxxxxxx.xxxxxx
Date=mm.dd.yyyy:hh.mm.ss
0 or more lines of comments
Received:
Host=33.33.33.33
Filename=xxxxxxxx.xxxxxx
Date=mm.dd.yyyy:hh.mm.ss
0 or more lines of comments
Received:
Host=199.199.199.199
Filename=xxxxxxxx.xxxxxx
Date=mm.dd.yyyy:hh.mm.ss
0 or more lines of comments
etc....
Thanks in advance,
behunter
Sent:
Host=199.199.199.199
Filename=xxxxxxxx.xxxxxx
Date=mm.dd.yyyy:hh.mm.ss
0 or more lines of comments
Received:
Host=33.33.33.33
Filename=xxxxxxxx.xxxxxx
Date=mm.dd.yyyy:hh.mm.ss
0 or more lines of comments
Received:
Host=199.199.199.199
Filename=xxxxxxxx.xxxxxx
Date=mm.dd.yyyy:hh.mm.ss
0 or more lines of comments
etc....
Thanks in advance,
behunter