Re: Problem in opening the file using Tail Module
- From: rob.dixon@xxxxxxx (Rob Dixon)
- Date: Wed, 29 Aug 2007 11:19:48 +0100
sivasakthi wrote:
I have used the following code to print the log files. but nothing is
printed even it doesn't show the warning message, no prompt is returned. what is the mistake in code , could u help me to find the
pbm???
#!/usr/bin/perl
use strict;
use warnings;
use File::Tail;
my $file=File::Tail->new("/some/log/file/path"); while (defined(my $line=$file->read))
{
print "$line";
}
File::Tail will read only lines that are added to the file after it has been
opened. Your program will simply sleep until something new is added.
Rob
.
- Follow-Ups:
- problem with simple pattern matching
- From: Jim
- Re: Problem in opening the file using Tail Module
- From: Sivasakthi
- problem with simple pattern matching
- References:
- Problem in opening the file using Tail Module
- From: Sivasakthi
- Problem in opening the file using Tail Module
- Prev by Date: Re: Problem in opening the file using Tail Module
- Next by Date: Re: Problem in opening the file using Tail Module
- Previous by thread: AW: Problem in opening the file using Tail Module
- Next by thread: Re: Problem in opening the file using Tail Module
- Index(es):
Relevant Pages
|
|