Re: Best method for seeking to n lines before end of file [ implementation of tail ]
- From: xhoster@xxxxxxxxx
- Date: 31 May 2006 18:24:04 GMT
graemenewlands@xxxxxxxxx wrote:
Hello,
Perhaps someone can help me with a problem I have at the moment and is
causing some debate with my colleagues:
What is the best technique
best according to what criteria?
to seek to the end of a file and load in
say, the last 10 lines like the tail command does.
I like:
open my $fh, "-|", "tail", "-10", $file or die $!;
my @foo = <$fh>;
Perhaps not best in terms of portability, though.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.
- Follow-Ups:
- References:
- Best method for seeking to n lines before end of file [ implementation of tail ]
- From: graemenewlands
- Best method for seeking to n lines before end of file [ implementation of tail ]
- Prev by Date: Re: Best method for seeking to n lines before end of file [ implementation of tail ]
- Next by Date: Re: Best method for seeking to n lines before end of file [ implementation of tail ]
- Previous by thread: Re: Best method for seeking to n lines before end of file [ implementation of tail ]
- Next by thread: Re: Best method for seeking to n lines before end of file [ implementation of tail ]
- Index(es):
Relevant Pages
|
|