my $d=scalar(@b)/3; for (my $i=0; $i<=$#ddts; $i++) { for (my $index=0;$index<=($d-1);$index++) { my $x=(($#b-1)-$index*3); $new="