in reply to Re: Large text files into arrays, accessing final elements
in thread Large text files into arrays, accessing final elements
Did you try, for example: print $myfile[-1];
That will suffer exactly the same problems. There is simply no way to know how many lines a file (with variable length lines) contains without reading the whole file.
|
|---|