3 use strict qw(refs vars);
12 die if $ARGV[0] =~ m/^\-/;
14 my $totail= pop @ARGV;
18 my $parser= new Parse::Syslog $object, repeat=>0, arrayref=>1;
19 while (my $sl= $parser->next) {
20 print join("|", @$sl), "\n";
24 foreach my $staticpath (@ARGV) {
25 if ($staticpath =~ m/\.gz$/) {
26 my $fh= new IO::Handle;
27 open $fh, '-|', 'gunzip', '--', $staticpath or die $!;
29 !$fh->error or die "$staticpath $!";
30 $!=0;$?=0; close $fh or die "$staticpath $! $?";
32 my $fh= new IO::File '<', $staticpath or die $!;
34 !$fh->error or die "$staticpath $!";
35 close $fh or die "$staticpath $!";
39 my $tailer= new File::Tail name=>$totail,
40 interval=>60, adjustafter=>2, ignore_nonexistant=>1, tail=>-1