my $sth = $DB->prepare( 'INSERT INTO Files ( File_Path, File_Name, Size_Byte, Created, Modified, Accessed, Type ) VALUES ( ?,?,?,?,?,?,? )' ); foreach my $entry (@data) { next if ($entry =~ /^start|^Full/i); my @db_values = split (/,/,$entry); # do whatever value checking here ... checking for 7 values, etc. $sth->execute( @db_values ); } #### $sth->execute( @db_values ) or warn $DB->errstr();