in reply to Re: Extract Duplicates by one linerin thread Extract Duplicates by one liner
@a=qw/foo bar bar baz/; print join ", ", grep { !$h{$_}++ } @a;