sivasakthi wrote:
On Wed, 2007-09-05 at 07:06 -0400, Chas Owens wrote:
On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote:
snip
Thanks for your suggestions.. but i need to read a file from backwards...
First time reading from backwards & set the last line position to one
variable..next time read
On Wed, 2007-09-05 at 07:06 -0400, Chas Owens wrote:
> On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote:
> snip
> > Thanks for your suggestions.. but i need to read a file from backwards...
> > First time reading from backwards & set the last line position to one
> > variable..next time reading ba
On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote:
snip
> Thanks for your suggestions.. but i need to read a file from backwards...
> First time reading from backwards & set the last line position to one
> variable..next time reading backwards until reach that variable position...
> is it possible t
> snip
>
> Unless you really need to read it backwards, I would suggest saving
> the point you stopped processing by calling tell() on the filehandle
> and saving the number given to you to a config file and then, on the
> next run of program, reading the number and calling seek() on the
> fileh
On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> I have read a log file from backwards, the code is following,
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use File::ReadBackwards;
> my $bw = File::ReadBackwards->new("/log/path") or die $!;
> my $line;
> while (defined($line =
Hi Guys,
I have read a log file from backwards, the code is following,
#!/usr/bin/perl
use strict;
use warnings;
use File::ReadBackwards;
my $bw = File::ReadBackwards->new("/log/path") or die $!;
my $line;
while (defined($line = $bw->readline))
{
print $line;
}
$bw->close();
In the abo