in reply to memory use array vs ref to array

Since you seem to want to put the contents of the file into array and are experiencing memory issues, you may want to check out Tie::File. From its description:

The file is not loaded into memory, so this will work even for gigantic files.

Also, you can check out the memory section of its documentation for information on controlling part of the memory usage for Tie::File.

Tie::File might not be the best solution for you, but it's the first thing that popped into my mind when reading your question.

Replies are listed 'Best First'.
Re^2: memory use array vs ref to array
by Anonymous Monk on Sep 08, 2016 at 06:59 UTC