in reply to Re: Tri state string compare?
in thread Tri state string compare? (Solved! see update2)

Que?

C:\test>p1 $abc = "AABCBAABCCCCAB";; $ab = "AABABAABABABAB";; ( $abca = $abc) =~ y/C//d;; $abca eq $ab and say "THAY MATCH!";; print $abca;; AABBAABAB

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Tri state string compare?
by Tux (Canon) on Dec 14, 2015 at 07:28 UTC

    Which is exactly what I would expect. The y/C/d command removes all C occurrences from the modified string, which is a copy of the original string. As your examples did not match in you OP, they also do not in my code snippet.

    But you added an explanation to the OP later, so I interpreted the question other than you meant to ask.


    Enjoy, Have FUN! H.Merijn