my @out = do {my %saw; grep !$saw{$_}++, @in};