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;
In reply to Re: DBD:Pg getting output in an array
by Corion
in thread DBD:Pg getting output in an array
by terrykhatri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |