1234567
print map "<th>$_</th>\n", @{$sth->{NAME}};print "</tr>\n";while (my $arrayref = $sth->fetchrow_arrayref) { print "<tr>\n"; print map "<td>$_</td>\n", map +(defined($_) ? $_ : 'NULL'), @$arrayref; print "</tr>\n";}