use DBI; my @a1 = (...); my @a2 = (...); my @a3 = (...); my @a4 = (...); my $max = größe des größten arrays; my $dbh = DBI->connect(...) or die $DBI::errstr; my $stmt = qq~INSERT INTO tabelle(spalte1,spalte2,spalte3,spalte4) VALUES(?,?,?,?);~; my $sth = $dbh->prepare( $stmt ) or die $dbh->errstr; for my $i ( 0 .. $max ){ $sth->execute( $a1[$i], $a2[$i], $a3[$i], $a4[$i] ) or die $dbh->errstr; } $sth->finish; $dbh->disconnect;