kazak has asked for the wisdom of the Perl Monks concerning the following question:
Trying to do: If string with "/sorry/" is found in a squid's log file, pass that string as an argument to a "hold" routine.my $name = "/var/log/squid/access.log"; my $res = ban ($_); my $ref=tie *FH,"File::Tail",(name=>$name); while (<FH>) { m/\/sorry\// && hold ($_); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Real time log parser
by Eliya (Vicar) on Jan 02, 2012 at 18:17 UTC | |
by kazak (Beadle) on Jan 02, 2012 at 18:36 UTC | |
by Eliya (Vicar) on Jan 02, 2012 at 18:56 UTC | |
by kazak (Beadle) on Jan 02, 2012 at 19:27 UTC | |
by Eliya (Vicar) on Jan 02, 2012 at 20:20 UTC | |
| |
|
Re: Real time log parser
by RichardK (Parson) on Jan 02, 2012 at 17:43 UTC | |
by kazak (Beadle) on Jan 02, 2012 at 18:11 UTC | |
by Anonymous Monk on Jan 02, 2012 at 18:33 UTC | |
|
Re: Real time log parser
by Anonymous Monk on Jan 02, 2012 at 17:23 UTC |