$s = 'hi, there, world, how, are you, today?'; print (join "\n", (grep ! $t{$_}++, (split /,\s+/, $s)));