in reply to Need to find a more efficient way to write if/elsif in loop
I'd suggest using a loop, along the following lines:
my @params; for my $col (2..$col_length + 1) { push @params, { row => $count, col => $col, input_value => $test1[ +$col - 2] }; } $googlesheet->batchupdate_cell(@params);
EDIT: or employ map as toolic suggested, that's actually more idiomatic.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need to find a more efficient way to write if/elsif in loop
by AllPaoTeam (Sexton) on Sep 05, 2014 at 16:02 UTC |