my $x = []; $x->[1]{bar}{baz}[3] = 7; bless $x, "whatever"; my $deref = sub { $_[0]->[1]{bar}{baz}[3] }; print "yeah: ", $x->$deref, "\n";