ついでに、今回ひっかかっていたところ。 DBD::SQLite 1.12では、こういうスクリプトを実行すると、最後に「closing dbh with active statement handles」という警告が出る。要するに一度も実行されないステートメントハンドルは、finishしてもActiveのまま残ってしまう。 use strict; use warnings; use DBI; unlink 'test.db'; my $db = DBI->connect('dbi:SQLite:test.db'); $db->do('CREATE TABLE test (data TEXT)'); my $sql = 'INSERT INTO test (data) VALUES (?)'; my $st = $db->prepare($sql); my @items = (); $st->