Perhaps Text::Balanced or Regexp::Common::balanced could help? I don't know what kind of content will be in the parens or how you will test for true/false, but the modules may help with tokenizing and the order of operations. Parse::RecDescent, as friedo mentioned, may also be helpful.
In reply to Re: logically recurse parentheses
by bobf
in thread logically recurse parentheses
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |