#! /usr/bin/perl -w
use strict;


my $str = 'Hello there there there, you look look look nice today';

#$str =~ s/\b(\S+)\s+\1\b/$1/g;

$str =~ s/\b(\S+)\s+(?=\1\b)//g;

print "$str\n";

