Symmetric difference

var a = ["John", "Serena", "Bob", "Mary", "Serena"]
var b = ["Jim", "Mary", "John", "Jim", "Bob"]
say (a ^ b -> uniq)

Output:

["Jim", "Serena"]

Last updated