my @params; for my $col (2..$col_length + 1) { push @params, { row => $count, col => $col, input_value => $test1[$col - 2] }; } $googlesheet->batchupdate_cell(@params);