keys{%{{map {$_=>$_}(@array)}}); -----Original Message----- From: Marius Roets [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 7:29 AM To: [EMAIL PROTECTED] Subject: Removing duplicates in arrays
I know this has been asked before, but I can't seem to find it. Is there a simple way to remove duplicates from an array. Currently I sort the array, and then iterate through the sorted array, and push elements into a new array when its different than the previous one. I have read somewhere of a oneliner (I think at perlmonks), but I can't find it. Thanks Marius -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]