Ok, the simplest way i see is inserting the elements into a hash as keys,
thus eliminating duplicates, and then do keys on the hash.
-----Original Message-----
From: Philip Peeters [mailto:[EMAIL PROTECTED]]
Sent: 05 e?iy 2001 a. 21:03
To: [EMAIL PROTECTED]
Subject: Perl: Finding unique strings in an array
Hi,
Is there some magical way to identify unique strings within an array?
Example:
@array = ( "beer","water","wine","beer","wine");
and I'd like to end up with: beer, water, wine
If there is some kind of function that does this, then I'd be most glad
to hear of it. If not, I'll figure something out with cmp.
Thanks,
Philip
___________________________________________________________________
To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax,
all in one place - sign up today at http://www.zdnetonebox.com