in reply to About text file parsing
Your arrays might occupy gigs of virtual memory, which might be too much for your machine. Also there are overheads for the internal format in which Perl stores arrays. You might be better off creating a RAM drive to store these as files in memory, so that a specific amount of memory is reserved in advance and it is less memory than is required for Perl arrays. It depends on your OS how to achieve this. And any solution also depends on what you are about to do with these arrays.