lhoward pointed me to Parse::RecDescent when I was reading in a config file. It allows you to define just about any parsable text. It also lets you generate a module to parse the specified format, so if you distribute your program, the end user doesn't need to have Parse::RecDescent installed.