in reply to DBI output in 3 columns

a loop to do what you need.. loop untill we hit 200, then reset loop counter and write the end and starting TD tags... when done, end table.
qq() is another way of stating quotes, so you don't have to escape your quotes in the html.
my $district; my $ID; my $index_num = 0; # initialize counter print qq(<TABLE><TR><TD>\n); while (($district,$ID) = $sth->fetchrow_array) { print qq(<a href="$ID">$district</a> <br>\n); if (++$index_num == 200) { # end of index list, end TD and reset counter print qq(</TD><TD>\n); $index_num = 0; } } print qq(</TD></TR></TABLE>\n);
Hope that gives you some ideas..
-Syn0