use Data::Table; use strict; my $table = Data::Table::fromSQL($dbh, "select * from mytable where blah = ?", ["blah"]); print $table->html;