It sounds like you're looking for the NAME (or NAME_lc or NAME_uc) statement handle attribute. Per the DBI docs:
NAME (array-ref, read-only)
Returns a reference to an array of field names for each column. The names may contain spaces but should not be truncated or have any trailing space. Note that the names have the letter case (upper, lower or mixed) as returned by the driver being used. Portable applications should use NAME_lc or NAME_uc.
print "First column name: $sth->{NAME}->[0]\n";
HTH
In reply to Re: Maintaining column name and column order using DBI
by bobf
in thread Maintaining column name and column order using DBI
by Tatnall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |