use strict; use warnings; my (%hash); $hash{'id1'} = "1"; doSub1 (\%hash); # the return id2 should be changed within doSub2 when doSub1 call it. print "$hash{'id2'}\n"; sub doSub1 { # accept param as hash by reference my ($hrec_ref) = @_; $$hrec_ref{'id2'} = "0"; # doSub2(\$hrec_ref{'id2'}); Return Error. Not valid. (works for me - Hippo) doSub2 (\$hrec_ref->{'id2'}); } sub doSub2 { # handle only a single string param by reference my ($href) = @_; $$href = "value changed in doSub2"; }