in reply to How do I find if an array has duplicate elements, if so discard it?

Err, okay, my answer, short and sweet: use a hash and array slices:
my @a=(1 .. 2); my @b=(2 .. 3); my %c; @c{@a,@b}=(@a,@b); warn "Duplicates exist!" if scalar @c{@a,@b} != (@a+@b);
Of course, in this instance you don't want the last line - instead you'd probably want something like:
my @d=keys %c;
...which will be out-of-order, but guaranteed duplicate free.