my $var = 1; if($var =~ qr{#{\C->TEST_CONST}}) { print 'OK!' } else { print 'Not matched!' }