|
|
| No such thing as a small change | |
| PerlMonks |
Re: compare two strings and return only he unique values.by LanX (Monsignor) |
| on Feb 03, 2013 at 22:44 UTC ( #1016873=note: print w/ replies, xml ) | Need Help?? |
|
please use real <code> tags and not <code> looks like you want the symmetric difference of two character sets
see Using hashes for set operations... for background.
UPDATE:seems like nobody mentioned that its a FAQ How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
UPDATE:Just in case you only want the unique characters in both strings:
oops basically already shown by Not_a_Number EDIT: one liner =)
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||