1 | $LoL2D[$i][$j] can be written equivalently as$LoL2D[$i]->[$j] but |
2 | NOT $LoL2D->[$i]->[$j] or $LoL2D->[$i][$j] |
3 | as left hand side of -> MUST be a reference and NOT an array or hash |
4 | $ref_to_LoL2D = \@LoL2D; # is allowed and now |
5 | access by $ref_to_LoL2D->[$i][$j] or $ref_to_LoL2D->[$i]->[$j] |
6 | Note [ .. ] or { .. } create anonymous arrays or hashs respectively which can be assigned to a reference and then dereferenced by -> |
7 | ( .. ) constructs a list which can be assigned to an Array or Hash |