in reply to Re: how can i read only the last line of a files
in thread how can i read only the last line of a files

This is equivalent code (though note davorg's reply for a much more robust solution) ... no need to iterate through everything:
sub lastlines { return map { $_[-1] } @_; } # or, w/o using a sub: @last = ($a[-1], $b[-1], $c[-1]);