in reply to I have a hash in a hash in a .....

Recursively walk a hash to get to an element
use strict; use warnings; sub pointer_to_element { use List::Util 'reduce'; reduce(sub { \($$a->{$b}) }, \shift, @_); } my @k = qw(a b c); my $href = {}; ${pointer_to_element $href, @k} = 5; use Data::Dumper; print Dumper($href);

Caution: Contents may have been coded under pressure.