in reply to qq question

If you run this:

use strict; use warnings; my $test = qq(a (b c d); print $test;

You get this error:

Can't find string terminator ")" anywhere before EOF at math1.pl line +4.

Which clearly indicates that perl follows the depth (matching) of '()' pairs.