use Set::Scalar; $s = Set::Scalar->new( 2, 4, 6, 8, 10); $t = Set::Scalar->new( 1, 2, 3, 4, 5); $d = $s->symmetric_difference($t); print $d, "\n";