my %ref_hash = %{$ref};
When you do that you are creating a copy. Don't do that if you want to modify the arguments.
sub test { my ($ref) = @_; $ref->{'new'} = 'new_v'; print join(",", keys (%$ref)),"\n"; }
In reply to Re: passing hash ref to a function
by hippo
in thread passing hash ref to a function
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |