use constant CONSTANT => "foo";
my ($foo) = "foobar" =~ /(${\CONSTANT})/;
...yields
test.pl:2:25: /\C/ is deprecated. Use of the \C character class in regular expressions is deprecated in perl v5.20.0. To examine a string's UTF-8-encoded byte representation, encode it to UTF-8. [Community::DeprecatedFeatures]
...yields