use warnings; use strict; use List::Util qw(min); print "Script open!\n"; ### Initialize Input my $input_file_name = "test.csv"; open (my $fil ,"<",$input_file_name) or die "Can not open file $input_file_name!"; my $size_of_array_chunks = 10; ### set the number in wich chunks you want to split the array. Necessary because otherwise the generated statement in db_query would be too long my @allrows = <$fil>; ### stores all rows of the csv file