in reply to accessing element of array of arrays
You see, your code should be working, like FunkyMonk predicted. You have a bug somewhere elseperl -e ' $A[5][2]= 33; $B[1][1]=4; $B[5][2]= $A[1][1]; $B[1][1]=9; p +rint "A=$A[5][2], B=$B[1][1]\n";' A=33, B=9
To understand what [][] means, it is just a short form of []->[]. So you really have only pointers to arrays in each $AoA1[...]. Exactly as in C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: accessing element of array of arrays
by JadeNB (Chaplain) on Jul 07, 2008 at 23:04 UTC |