in reply to Re: How to loop over two lines, alter a value in the current line and save it to the previous line?
in thread How to loop over two lines, alter a value in the current line and save it to the previous line?
This cumulates the 3rd column, which although I mentioned it in the question on reflection isn't actually what I was wanting to do. Apologies for wasting your time with a badly worded question. I'm looking to alter a value in the current line, and then have that value saved to the previous line for use in the next iteration of the loop.$current_columns[2] += $previous_columns[2]; $previous_line = join ' ', @current_columns;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to loop over two lines, alter a value in the current line and save it to the previous line?
by 1nickt (Canon) on Jan 07, 2016 at 12:43 UTC | |
by rjc33 (Sexton) on Jan 07, 2016 at 14:00 UTC | |
by 1nickt (Canon) on Jan 07, 2016 at 14:07 UTC | |
by rjc33 (Sexton) on Jan 07, 2016 at 14:14 UTC | |
by rjc33 (Sexton) on Jan 07, 2016 at 14:19 UTC |