note
PrakashK
I frequently use hash slices to eliminate duplicates from an array.
<p>
A simplified example:
<code>
my @a = (1,2,3,2,1);
my %a;
@a{@a} = (1) x @a;
my @unique_a = keys %a;
</code>
Of course, this does not preserve the order of the elements as they were in original array @a.
99744
99755