in reply to Unfolding a nDeep structure

Seems like a job for recursion. With that, and knowing that you can do $ref = $arr->[3]; $ref->[2]; in place of $arr->[3][2], I think you can manage it. :)