in reply to
Array of Hashes vs. Array of Arrays vs Array of Lines vs ...
I would think that "keeping it in memory" would be dependent on how much memory you have.
If you have plenty, then perl will have no problem reading in the whole file and you should use whatever data structure fits how you're gonna use it.
If you don't have enough memory you could try Tie::File to effortlessly access the lines while leaving the data on disk.
Trying to optimize via different data structures is probably a waste of time and also probably counter productive.