use Data::Dumper; my $sth = $dbh->table_info; my $columns = $sth->fetchall_arrayref({}); print Dumper $columns;