in reply to Passing hashes by reference

By saying,     my %h_ref = %{+shift}; in the sub, you make a copy of the hash which all your work goes into. Instead,

my $h_ref = shift; # ... $h_ref->{'one'}= 'thing_' . $tail; # etc
That works on the original external hash.

After Compline,
Zaxo