in reply to Re: Re: Duplicate Words
in thread Duplicate Words

If you want to remove dup words from anywhere in the string rather than just consecutive duplicates, try:

s/\w+\s*/$words{$&}++?'':$&/ge;
or to ignore case:

s/\w+\s*/$words{"\L$&"}++?'':$&/ge;