2 ms·
Probably dereferencing, since Perl never had multidimensional datastructures. You'd put a reference to an array into an array value, and then access it with $ar
by luckylion 6y ago
Probably dereferencing, since Perl never had multidimensional datastructures. You'd put a reference to an array into an array value, and then access it with $array[0]->[0] (iirc) to get the first value of the first array. That was the easy way to write it, the much more annoying way was like ${$array[0]}[0] (or $$array[0][0] if you really wanted to? my memory is fortunately fading), I believe, which got really out of hand when you went three or more levels deep.
- kqr 6y agoThe syntax for accessing nested indices actually automatically resolves references the way you'd expect. So for the specific case of accessing a single deeply nested value, no special incantation is needed.