http://www.perlmonks.org?node_id=1016875


in reply to Re^3: compare two strings and return only he unique values.
in thread compare two strings and return only he unique values.

Your solution is elegant and works beautifully with "ABCDE", "BCDEO" -- the OP's two initial strings. But the OP later included "ABCDE", "BBBBB" as options, clearly indicating the possibility of character reptition. Quite agree that a clearer spec would help...