in reply to 2d array
"Dynamic" is not a perl data type. I think that you mean that you want changes in the row arrays to appear in the matrix and changes made in the matrix to appear in corresponding row array. The code you posted does do this. If you wanted to initalize the matrix with the current value of the rows, but allow them to modified independently, you would use the [] operator rather than the \ operator.
my @array_2d = ([@row1], [@row2], [@row3], [@row4], [@row5]);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 2d array
by jnarayan81 (Sexton) on Jan 04, 2013 at 12:18 UTC | |
by BillKSmith (Monsignor) on Jan 04, 2013 at 20:46 UTC |