Sounds to me like a perfect job for Parse::RecDescent. Get it from the CPAN.
In reply to Re: How do I extract this data structure? by davorg in thread How do I extract this data structure? by HamNRye