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 ...
|
|
|
|