Hi lina, On Tue, Jun 12, 2012 at 7:08 AM, lina <[email protected]> wrote:
> Hi,
>
> 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,
>
>
> you can also use Tie::File like so:
use Tie::File;
my $file=$ARGV[0];
tie my @file_lines,'Tie::File',$file or die "can't tie file:$!";
print join "\n",@file_lines[-13..-1]; # prints last 13 lines.
--
Tim
