my $h = { foo => 1, bar => [ 2, { doz => 3 } ] }; getter($h); say $h->foo->[1]->doz; # 3