$s =~ s/cdefg/cdxyz/g;
では不満なのか

あえて特殊エスケープとかつかうなら
$s =~ s/cd\Kefg/xyz/g;
または
$s =~ s/(?<=cd)efg/xyz/g;