B. Fongo wrote at Mon, 30 Jun 2003 23:46:19 +0200:
> Is there any other way to check array uniqueness except the Module
> Array::Unique?
> I'm having problems in installing these two Modules: Array::Unique and
> Tie. So I'm thinking of another way to check array for replicates.
>
> I help will be appreciate. Thanks a lot!
You can also hardcode it e.g.
{
my %seen;
if (grep {$seen{$_}} @array) {
# at least one element is twice
} else {
# unique
}
}
Greetings,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]