as per Japhy, corrected below
{
my %seen;
@uniq = grep { !$seen{$_}++ } @arrayWithDups;
}
## then ignore this
@uniq = map { my $temp = $_ ^ $temp; } @uniq;
undef @uniq;
# now @uniq contains no duplicates. (nor anything else). :P
> -----Original Message-----
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 30, 2002 3:08 PM
> To: 'Kirby_Sarah'; [EMAIL PROTECTED]
> Subject: RE: Down and dirty duplicate deleter
>
>
> {
> my %seen;
> @uniq = grep { !$seen{$_}++ }, @arrayWithDups;
> }
>
> > -----Original Message-----
> > From: Kirby_Sarah [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 30, 2002 3:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: Down and dirty duplicate deleter
> >
> >
> > Hi,
> >
> > I have instances where I want to delete duplicate elements
> > out of an array.
> > Is there an easy way to do this?
> >
> > -Sarah
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --------------------------------------------------------------
> --------------
> --------------------
> The views and opinions expressed in this email message are
> the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]