#! use /usr/bin/perl; use strict; use warnings; use DBI; my $result; my $file = 'testSelect.sql'; my $dbh = DBI->connect("dbi:SQLite:dbname=Test.db","",""); open my $fh, '<', $file or die $!; while (my $sql = <$fh>) { $dbh->do($sql) or die $dbh->errstr(); } close $fh; $dbh->disconnect;