http://qs321.pair.com?node_id=729439


in reply to Perl::DBI - return column header

After you execute the statement, the statement handle should contain a NAME attribute. This is a reference to an array containing the names of the columns returned. $sth->{NAME}[$i] will give you the name of column $i. See perldoc DBI.

90% of every Perl application is already written.
dragonchild