if($sequence[1] =~ m/^(.*)$reg(.*)$/i){ $aligned[$posCount][0] = $1; $aligned[$posCount][1] = $2; $aligned[$posCount][2] = $3; } #### if($sequence[1] =~ m/^(.*)$reg(.*)$/i){ for(my $x = 0; $x < $numInsertionDeletes; $x++){ $aligned[$posCount][$x] = ????????; } }