in reply to Re^2: Memory usage by perl application
in thread Memory usage by perl application

In your first post, you talked about a hash. I see no hash in your code.

See illguts, again. It talks about the underlying data structures and their memory needs.

Depending on how large each line in $input_file is, Perl will, again, use up to 16 times the memory (based on the calculation that each line is one character long, and takes an overhead of 16 bytes, disregarding the SvPV entry and overhead of the array itself).

This behaviour is acceptable to me. There are very few reasons to read a file completely into an array. If you really need to handle generic large data structures, most likely a database like Postgres or SQLite will suit your needs far better than storing the data through Perl can.