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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"