$sth = $dbh->prepare(“insert into table values (?, ?, ?)”); for my $i (0..2) { # adjust the upper limit accordingly $sth->execute($array1[$i], $array2[$i], $array3[$i]); }