Subject checkbox yes Data checkbox yes ....etc #### my $d=scalar(@b)/3 # @b is the array with the content of the file for (my$i=0; $i<=$#ddts; $i++){ #@ddts is the array in which is the result of an html form for (my $index=0;$index<=($d-1);$index++) {my $x=(($#b-1)-$index*3);# i calculate the position of the second word from each row, there is the html type i need $new=""; print "$new
$ddts[$i]
"; } }