if @myfile is tied file array: (...) $size=@myfile; #this dies and gives "out of memory" error
This issue seems to be directly addressed in the docs to Tie::File (in the caveats):
Note that accessing the length of the array via $x = scalar @tied_file accesses all records and stores their offsets.
Did you try, for example:
print $myfile[-1];In reply to Re: Large text files into arrays, accessing final elements
by Not_a_Number
in thread Large text files into arrays, accessing final elements
by isabella423
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |