use DBI qw( ); my $dbh = DBI->connect('dbi:Sponge:'); my $sth = $dbh->prepare('SELECT * FROM Table', { NAME => [qw( id value )], rows => [ [ 1, 'foo' ], [ 2, 'bar' ], ], RaiseError => 1, }); $sth->execute(); # Does nothing while (my $row = $sth->fetch()) { print("$row->[0]: $row->[1]\n"); }