in reply to qq question

I think the underlying cause is that the '(' in the expression 'qq(' is being declared as a string delimiter but one which maintains the nesting rules of a bracket.

Revealing tests cases include (with their effects):

1) try with too many right brackets (perl will generate a syntax error on an attempt to nest to a depth of -1).

2) try with too many left brackets (perl will complain using words like 'can't find a string terminator ")"'

3) use a different nesting or non-nesting delimiter from the content and mismatch the brackets in the content as before, e.g. qq{(((((()} (perl will have no problem with this despite the mismatching brackets, because they are of a different type than the delimiter being declared for qq.)

-M

Free your mind