How to read the files last 13 lines,

only process the data of the last 13 lines, ignore the head parts.

Thanks with best regards,


Try File::Tail, this is might what you are looking for:

use File::Tail;

my $file=File::Tail->new(name=>"file.txt", tail=>13);
while (defined(my $line=$file->read)) {
    print "$line";
}

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to