% perl -lane 'print grep !$s{$_}++, @F' one two two three onetwothree % perl -lane '$,=$"; print grep !$s{$_}++, @F' one two two three one two theee