open(my $infh, '<', $tmpfile2);
open(my $outfh, '>', $str_file);
while (<$infh>) {
print $outfh;
print $outfh $_;
last if /^\n/s;
}
close $infh;
-