in reply to Re^2: DBI::CSV using a variable to request columns
in thread DBI::CSV using a variable to request columns

DBI can give you the column names, but only after the ->execute, you can find this e.g. in the doc's section on Statement Handle Attributes.
I thought that I might display $queryResult in a web page.
For this purpose, you could use HTML::Table::FromDatabase, which could replace your while loop with a simple call to
my $table = HTML::Table::FromDatabase->new( -sth => $sth, -html => 'escape', -border => 1, ); print "<html><head><title>this is the page title</title></head><body>< +h1>this is the header</h1>"; print $table->getTable; print "this is the end</body></html>";

Replies are listed 'Best First'.
Re^4: DBI::CSV using a variable to request columns
by Sandy_Bio_Perl (Beadle) on May 20, 2016 at 21:42 UTC

    Thank you, brother soonix. Your ontological knowledge knows no bounds. er.. have I gone to far with the whole Monastery/Anselmian stuff..