#!/usr/bin/perl -w # This code available under a BSD 3-clause license. # http://opensource.org/licenses/BSD-3-Clause use strict; use DBI; my $dbh = DBI->connect("dbi:SQLite:db=:memory:", "", "", { AutoCommit => 0, RaiseError => 1 } ); defined $dbh or die "db connect failed"; $dbh->do(qq[ CREATE TABLE phrase (id INTEGER PRIMARY KEY, phrase TEXT) ]); # Insert 500 rows of a common phrase: my $phrase = "The quick red fox jumps over the lazy brown dog!"; my $sth = $dbh->prepare(qq[ INSERT INTO phrase (phrase) VALUES (?) ]); $sth->execute($phrase) for (1..500); $dbh->commit();