I first didn't understand what you want to do, but cdarke pointed me to it.
It seems you want to solve two problems:
Firstly, you want to use the value in $regexp as some kind of template which later on uses the value of $thing to replace the string $thing within some$thing. This does not happen, because regular expressions are, to Perl, more or less like double-quoted strings (see perlop, section Quotes and quote-like operators). So, your $regexp will always remain some$thing and never access the value of the variable named $thing.
\Q...\E don't do double interpolation, they do quoting, so the regex meta characters are not seen as meta characters anymore and thus don't help you with your problem.
Having double interpolation the default in Perl would be horrendous, because after double interpolation immediately follows triple interpolation whenever you're using a double-interpolated string in any string context, which would make it nearly impossible to use any modules that construct strings or regular expressions.
To solve your problem at hand, doing template-like replacement on a string, you don't want to use a variable (and its name), but a hash which contains the name/value pairs:
my $regexp = 'some$thing';
my %values = (
'thing' => 'THING',
# ... other value mappings
);
print $regexp;
$regexp =~ s/\$(\w+)/$values{$1}/ge;
print $regexp;
If you're still wondering, yes, it's possible to do the replacement on variables by name too, but Dominus has explained far much better why it's stupid to use a variable as a variable name.
To address your last question, the regular expression formed by $regexp = qr/some\$thing/
matches any string that contains the substring some$thing literally, that is, with a dollar sign in the middle. |