#!/usr/bin/env perl use strict; use warnings; use DBI; my $dbh = DBI->connect('dbi:SQLite:dbname=/tmp/testdb','','') or die; my @data; my $sth = $dbh->prepare ('select ?'); for my $arg (qw/one two three/) { $sth->execute ($arg); push @data, $sth->fetchrow_array; } print "$_\n" for @data;