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