$new = $old; $new =~ s/$pattern/qq{$replace}/eeg;