in reply to Re: end of file!
in thread end of file!
Hope this helps.my @data; # Store the last part of the file my $length = -10; # enter the longest length of the last line (and add + a few bytes to it), then negate it open (F,"test") || die "Can't open file"; # open the file or die seek (F,$length,2); # Go back $length @data = <F>; # Get the rest of the file in @data print $data[$#data]; # Print the last line
|
---|