my $n = 0; while ( $str1 =~ /(\S+\s+)(?=(\S+\s+\S+))/g ) { print "$t1$t2\n"; ++$n; }