You could have a look at CPAN's Text::Balanced or Text::DelimMatch though.
Hope this helps, -gjb-
In reply to Re: Parsing Text into Arrays.. by gjb in thread Parsing Text into Arrays.. by castaway