#!/usr/bin/perl -w use strict; use My::DB; # connect SQLITE my $dbh = My::DB->new({server => 'sqlite', db => 'test.db'}); # connect PostgreSQL #my $dbh = My::DB->new({server => 'pg', db => 'test'}); my $sth_select = $dbh->prepare("SELECT * FROM tbl1"); $sth_select->execute; while ( my @row = $sth_select->fetchrow ) { print "@row \n"; }