my $ref = pointer_to_element(\%myhash, qw(bedrock flintstone fred)); $$ref = 42; # set it to 42 $$ref++; # increment it print $$ref; # print it!