
use strict 'vars';
while (<>) {
  print if /\b(\w+)       # First appearance of word
            \W+           # intervening punctuation and space
            \1\b          # second appearance of same word
           /x;
}





