in reply to how to parse large files
You may also wish to have a look at grinder's most excellent Regexp::Assemble. See grinder's scratchpad and Why machine-generated solutions will never cease to amaze me for more.
HTH,