sub repeated_string {
  my ($string,$result)=shift;
  while ($string=~/(.+)(?=.*?\1)/sg) {
    $result=$1 if length($1) > length($result);
  }
  return $result;
}
