in reply to Retrieving column names from SQL with DBI

Use "$sth{NAME}" to retrieve the list of field names in the query:
$sth->execute(); my @fields = @{$sth->{NAME}};

"It's not how hard you work, it's how much you get done."