my $id2_value = $$hash_ref{'id2'}; &doSub2{\$id2_value); $$hash_ref{'id2'} = $id2_value;