in reply to Re: Need to find a more efficient way to write if/elsif in loop
in thread Need to find a more efficient way to write if/elsif in loop
$AZ_len = 10; &update_google ($az_state, $AZ_len); sub update_google { my($infile, $col_length) = @_; #Open files to read from open GOOG, "<", $infile or die $!; $count = 6; while (<GOOG>) { @test1 = split(/ /); my @aoh = map { {row => $count, col => $_+2, input_value => $test1[$_]} } 0 .. 4; $googlesheet->batchupdate_cell(@aoh); $count++; } close(GOOG); } # $infile looks like this 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 0 0 0 0 0 0 0 0 4 6 0 0 0 0 0 0 0 0 5 4 0 0 0 0 0 0 0 0 0 0 0 0 0 #Google spreadsheet only prints this 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need to find a more efficient way to write if/elsif in loop
by toolic (Bishop) on Sep 05, 2014 at 16:51 UTC | |
by AnomalousMonk (Archbishop) on Sep 05, 2014 at 17:36 UTC | |
|
Re^3: Need to find a more efficient way to write if/elsif in loop
by AllPaoTeam (Sexton) on Sep 05, 2014 at 16:51 UTC |