logo       
Google Custom Search
    AddThis Social Bookmark Button

RE: Down and dirty duplicate deleter: msg#01885

Subject: RE: Down and dirty duplicate deleter
One of the classic ways is to assign each element as a key of a hash.

foreach(@array){
  $hash{$_} = 1;
}

@array = keys %hash;

-----Original Message-----
From: Kirby_Sarah [mailto:Kirby_Sarah@xxxxxxx]
Sent: Tuesday, July 30, 2002 12:04 PM
To: beginners@xxxxxxxx
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: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>