AW: Problem in opening the file using Tail Module
- From: ang@xxxxxxxxxxxxx (Angerstein)
- Date: Wed, 29 Aug 2007 13:29:50 +0200
Buffering is a problem, when you are printing to files or pipes.
The Systems don´t write everything right away to disc. It waits until it
has some time for it or the buffer is full.
If you disable buffering, you write without wait for the cost of
performance.
(if you want to write with no buffering at all you use syswrite and only
write 1 char at a time.)
-----Ursprüngliche Nachricht-----
Von: sivasakthi [mailto:msivasakthi@xxxxxxxxx]
Gesendet: Mittwoch, 29. August 2007 12:13
An: Jeff Pang
Cc: beginners perl
Betreff: Re: Problem in opening the file using Tail Module
i didn't get your point , please explain little bit more...
Thanks,
Siva
On Wed, 2007-08-29 at 17:55 +0800, Jeff Pang wrote:
I tested the codes,which run well for me.
Give a try to add '$|++' to disable IO buffer.
2007/8/29, sivasakthi <msivasakthi@xxxxxxxxx>:
Hi Guys,
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";
}
Thanks,
Siva
.
- References:
- Re: Problem in opening the file using Tail Module
- From: Sivasakthi
- Re: Problem in opening the file using Tail Module
- Prev by Date: Re: Problem in opening the file using Tail Module
- Next by Date: AW: Problem in opening the file using Tail Module
- Previous by thread: Re: Problem in opening the file using Tail Module
- Next by thread: Re: Problem in opening the file using Tail Module
- Index(es):