How much time is spent building those hashes, and how much time is spent on disk IO?

I also see a lot of stars in your regexes (at least they're not deathstars .*). I'm sure they're not all needed. For example, in: if(/(.{1,8})\S*:\S*/){ the last \S* accomplishes nothing since it isn't captured.