sub repeated_substring {
  local $_ = shift;
  my $i = int(length()/2)+1;
  /(.{$i}).*?\1/ and return $1 while --$i;
  return;
}

