in reply to Re: how to remove
in thread Removing duplicate array elements
That's assuming you want the values in the order in which they first occur.@test = do { my %s; grep { !$s{$_}++ } @test };
@test = do { my %s; @s{@test} = @test; values %test };
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re:(GOLF) Removing duplicate array elements
by tachyon (Chancellor) on Feb 16, 2003 at 23:44 UTC | |
by jdporter (Paladin) on Feb 17, 2003 at 03:09 UTC | |
by tachyon (Chancellor) on Feb 17, 2003 at 03:32 UTC |