I would like to put a large text file into an array and then access elements close to the end of the array.
When I use:
@myfile=<FILE>;
I get an "Out of memory!" error message. Tie::File successfully ties the file, I believe, however the code dies and gives the same memory error as above when I try and access the last element or have its size returned. Note that it does not die when I access, say, the first element.
example, if @myfile is tied file array:
print $myfile[0]; #this prints as expected!
$size=@myfile; #this dies and gives "out of memory" error
Any suggestions?