my $sth = $dbh->prepare("INSERT INTO table (a, b, c) VALUES (?, ?, ?)"); for my $row (@table) { $sth->execute($row->[0], $row->[1], $row->[2]); } $dbh->commit;