use strict; use warnings; use DBI; my $dbh = DBI->connect("dbi:Pg:dbname=AvCloudLiteDB;host=127.0.0.1;port=60077;", ,, #$username, $password, {AutoCommit => 0, RaiseError => 1, PrintError => 1} ) or die "Cannot - db:$DBI::errstr"; print "Connected..\n"; my $sth = $dbh->prepare("SELECT * from GRIDS"); while (my $h = $sth->fetchrow_hashref){ print "$_=$h->{$_}; " for keys %$h; print "\n"; } close $dbh;