> http://search.cpan.org/search?dist=File-ReadBackwards
Oh, well, if you're going to go looking for CPAN modules, take a look at
Mark-Jason Dominus' stellar Tie::File.
xoxo,
Andy
--
'Andy Lester[EMAIL PROTECTED]
Programmer/author petdance.com
Daddy parsley.org/quinn Jk
William Black wrote:
>
> Hi all,
Hello,
> I have a quick question about seek(). If I have a file with 100 lines of
> data and I want to seek to the last line of the file and read it. How is
> this done? Below is what I'm trying to do. A little help please.
use File::ReadBackwards;
my $bw =
> I have a file that has roughly 100 lines. I want to use the seek function
> to seek to the end of the file and read the last line into a var and pring
> it out. Can someone help?
That's not what the seek function does. The seek function finds a
specific byte position in a file, and you're
change:
seek(LOG,0,2);
to:
seek(LOG,-1,2);
hth
toby
-Original Message-
From: William Black [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 10:42 AM
To: [EMAIL PROTECTED]
Subject: RE: seek function call
Hi all,
I have a quick question about seek(). If I
Hi all,
Quick question.
I have a file that has roughly 100 lines. I want to use the seek function
to seek to the end of the file and read the last line into a var and pring
it out. Can someone help?
Thanks,
William Black
_
Hi all,
I have a quick question about seek(). If I have a file with 100 lines of
data and I want to seek to the last line of the file and read it. How is
this done? Below is what I'm trying to do. A little help please.
File x.pl:
a
b
c
d
e
open(LOG,"x