> Can anyone tell me the best method for removing duplicate
> array values.
>
> eg:
>
> @array = qw( a a a b b b c);
>
> becomes after some operation I cant seem to figure:
>
> @new_array_or_same = (a b c);
In this situation, I usually use a hash instead of an array so I can
create highly useful statistics of how often each value occurs.
So I would do:
$hash{a}++ or $hash{b}++ or $hash{c}++
And then, like Jeff said, you could look in the manpage and get your
array from this hash you've created using the keys function like so:
@array = keys %hash;
Cheers,
-dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]