Since this is just a piece of a larger program, I'd rather keep it all in Perl if possible. And as for file sizes, a similar file that is 6328 lines is about 564k, so figuring ~7.3 million lines, that's about 666075395 bytes, so about 635 MB all together (correct me on my math if I'm wrong).