in reply to parsing a file
Of course there are some general-purpose-parsers available like Parse::Yapp or Parse::RecDescent. But depending on what you want to parse, there may be better alternatives, but I didn't understand what you want to parse, so I can't give you specific advise.