in reply to Thanks again no Time Out No Duplicates
This has the side effect of preserving the order of the list.my ( @res, $last ); foreach my $item ( @sorted ) { next if ( defined $last and $item eq $last ); push @res, $item; $last = $item; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Thanks again no Time Out No Duplicates
by ysth (Canon) on Feb 06, 2004 at 18:39 UTC |