in reply to Removing Duplicates in an array?
The keys of %unique are the unique values.my @list = qw(some list of of non unique words); my %unique = (); foreach my $item (@list) { $unique{$item}++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Removing Duplicates in an array?
by davorg (Chancellor) on Jun 26, 2001 at 17:13 UTC | |
by mr.nick (Chaplain) on Jun 26, 2001 at 17:55 UTC | |
by Hofmator (Curate) on Jun 26, 2001 at 18:17 UTC |