The hash solutions that have already been given have the right idea, but you can use hash slices to make it look a bit simpler.
--my %uniq; @uniq{@orig_list} = @orig_list; my @unique_list = keys %uniq;
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Detecting duplicate entries
by davorg
in thread Detecting duplicate entries
by r.joseph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |