in reply to Array of Hashes vs. Array of Arrays vs Array of Lines vs ...
Why do you need to "keep the file in memory"? You may be better to use DBI and DBD::AnyData and treat your file as a database.