in reply to Replacing letters in one string based on another

$str1 = "ABCXXFGH"; $str2 = "XXCDEFGH";; tr[X][\x00] for $str1, $str2;; ( $str3 = $str1 & $str2 ) =~ tr[\x00][X];; print $str3;; XXCXXFGH

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy