in reply to Re: balanced parens regexp hangs
in thread balanced parens regexp hangs - solved

There's no reason to have the our where it is. Use the following instead:
local our $parens = qr{ ... }xms;