Thank you Marshall, my $ref = \$hash{id2} is exactly what I am trying to look for.
Your given example is perfect. I'm just curious, when calling sub modify_anon_hash_value ($ref) is it possible to do it like modify_anon_hash_value (\$hash{id2}) ? without need to do my $ref = \$hash{id2}.
I have test run it with
The result return correctly without any error. Just to confirm if this way of coding is allowed or it may be a bad way to do it.modify_anon_hash_value (\$hash{id2});
In reply to Re^2: Sub hash param by reference
by hankcoder
in thread Sub hash param by reference
by hankcoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |