Alex Chen wrote:
> hi, all
>
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how
> to use it.please help!!!
>
> thanks
> alex chen
try this:
#!/usr/bin/perl -w;
use s
Alex Chen wrote:
>
> hi, all
Hello,
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how to
> use it.please help!!!
1) Install http://search.cpan.org/author/URI/File-ReadBackwards-0.98/
use File::R
use Tie::File;
tie @array, 'Tie::File', "file.txt" or die $!;
my $last_line=$array[$#array];
José.
> -Original Message-
> From: alex chen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 8:57 AM
> To: [EMAIL PROTECTED]
> Subject:
alex chen wrote:
> hi, all
>
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how to
> use it.please help!!!
the easy way (but inefficient):
# read until the last line
open F, "file.txt" or d
alex chen a écrit :
>
> hi, all
>
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how to
> use it.please help!!!
>
> thanks
> alex chen
>
> --
> To unsubscri
hi, all
i want to know how to get the last line of
a file .i know the func read has a paramenter offset but i don't know how to
use it.please help!!!
thanks
alex chen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]