in reply to Re^2: Iterative Subroutine Approach Question
in thread Iterative Subroutine Approach Question
Doing that should make sure that $comment is set appropriately each time you get to a detail line, without the need for any more than the single, large foreach loop.foreach my $row ($sheet->{MinRow}+18..$sheet->{MaxRow}){ if ($sheet->{Cells}[$row][2]->{Val} eq "SYSTEM") {$comment = $shee +t->{Cells}[$row-2][2]->{Val};} if ($sheet->{Cells}[$row][3]->{Val} eq "UPGRADE SOLUTION") {$upgra +de=1} else {$upgrade=0}; if ( $sheet->{Cells}[$rw][0]->{Val} =~ /(^\d+)/ ) { $line = $sheet->{Cells}[$rw][0]->{Val}; $qty = $sheet->{Cells}[$rw][1]->{Val}; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Iterative Subroutine Approach Question
by finhagen (Sexton) on Mar 13, 2009 at 02:58 UTC |