in reply to how to load regular expressions from a file
${^MATCH} is not interpolated?
Indeed, because ${^MATCH} doesn't appear in any literals. Perl isn't in the habit it executing your strings without being told.
my $replacementExpr = '"${^MATCH}\\x0Ause English ( no_match_vars );\\x0A"'; s{$searchPattern}{eval($replacementExpr)}egxms;
|
|---|