longjohnsilver has asked for the wisdom of the Perl Monks concerning the following question:
My questions are the following:use File::Tail; my $file_name = qw( logfile.log ) ; my $tail_file = File::Tail->new( name => $file_name, resetafter => 3, +adjustafter => 5 ) ; my $tail_line ; my %pattern = ( "Pattern1" => "Short Pattern to put on DB 1", "Pattern2" => "Short Pattern to put on DB 2", "Pattern3" => "Short Pattern to put on DB 3", ) ; while ( defined($tail_line = $tail_file->read) ) { foreach my $key ( keys %pattern ) { if ( $tail_line =~ /$key/ ) { --->> insert "Short Pattern" into the DB } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading from a fast logfile and storing on Oracle
by BrowserUk (Patriarch) on Dec 19, 2008 at 10:19 UTC | |
by MidLifeXis (Monsignor) on Dec 19, 2008 at 11:33 UTC | |
|
Re: Reading from a fast logfile and storing on Oracle
by moritz (Cardinal) on Dec 19, 2008 at 09:25 UTC | |
by longjohnsilver (Acolyte) on Dec 19, 2008 at 09:43 UTC | |
|
Re: Reading from a fast logfile and storing on Oracle
by roboticus (Chancellor) on Dec 19, 2008 at 14:05 UTC | |
by longjohnsilver (Acolyte) on Jan 08, 2009 at 11:10 UTC |