in reply to DBD:Pg getting output in an array
I'm not sure what you really expect to be in $ref, and what you get in $ref, but I guess that most of your question does not relate to DBD::Pg but simple DBI usage.
If you want to output your results as a table to the screen, I would use (say) Text::Table the statement:
$sth->execute or quit(); my @headers= @{ $sth->{NAME} }; my $rows= $sth->fetchall_arrayref(); my $t= Text::Table->new( @$rows ); print $t;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD:Pg getting output in an array
by terrykhatri (Acolyte) on Jul 27, 2014 at 19:23 UTC | |
by poj (Abbot) on Jul 27, 2014 at 19:33 UTC | |
by terrykhatri (Acolyte) on Jul 27, 2014 at 21:30 UTC | |
by Corion (Patriarch) on Jul 27, 2014 at 19:27 UTC |