http://qs321.pair.com?node_id=794758


in reply to Extracting a parenthesized fragment from a string

Maybe you could use Text::Balanced instead? (in particular extract_bracketed())

Module::CoreList says it's a core module since:

$ corelist Text::Balanced Text::Balanced was first released with perl 5.007003

(IOW, for 5.6 you'd have an additional dependency...)