use strict; use warnings; use 5.18.2; use DBI; #my $data_source = "/Documents/Perl/leavebal.db"; my $dbh = DBI->connect('dbi:SQLite:dbname=leavebal.db', undef, undef, {RaiseError =>1, AutoCommit =>0}) or die $DBI::errstr; my $sth1 = $dbh->prepare('SELECT name FROM sqlite_master where type="table"'); $sth1 -> execute(); my @data; say "Current tables are:"; while (@data = $sth1->fetchrow_array()) { print "\n"; say @data; } $sth1->finish; $dbh->disconnect;