Grandfather has provided a specific solution. I do not know if CPAN offers a solution because this does not look like a standard format.
Consider this radically different approach. Store your data in a standard format, such as XML, then:
- parse the data using an XML parser module from CPAN (such as XML::Twig)
- generate reports from the parsed data, using whatever custom format you need