if( length $tmp_line < 4000 ){ $tmp_line .= "\t" x 5; } else{ $tmp_line =~ s/(.{4000})/$1\t/g; }