in reply to getting the columns names from a mysql query

If in the future you decide to ditch fetchrow_hashref, you can always get the column names back using the {NAME} attribute of the statement handle:

my $query = $dbh->prepare( $SQLstatement ); $query->execute(); print "Column names: ", join( ', ', @{ $query->{NAME} }, "\n", "As upper: ", join( ', ', @{ $query->{NAME_uc} }, "\n", "As lower: ", join( ', ', @{ $query->{NAME_lc} }, "\n";

Chris
M-x auto-bs-mode