my $VALUE = "0\t" x 10; ## array of 0s and I having \t because I want a delimited outputfile chop($VALUE); print "First statement: ,$VALUE,"\n"; my $signal = "0.5\t0.845"; substr($VALUE, 2,2) =~ s/0/$signal/g; ## want to make changes at index 2 and 3 print "Second statement: ",$VALUE,"\n";