in reply to qq question
The qq operator is not a macro text substitution. The
purpose here is (among other things, see perlop) to enable
interpolation.
The relevant section in perlop is 'Gory details of parsing quote-like constructs'.
In Section
Seekers of Perl Wisdom