in reply to Re: Unrecognized escape \Q passed through in regex
in thread Unrecognized escape \Q passed through in regex

No, eval is dangerous (even qr{} can be dangerous), use String::Interpolate or use
$str =~ s{\\Q(.*?)\\E){quotemeta $1}ge;