It looks like you are doing a lot of ref to hash and hash to ref transformations. This might be simpler:
modifyHash(\%my_hash); sub modifyHash { my $hash_ref = shift; # Do something to the hash $hash_ref->{'test'}=1; # no need for return, the original hash has been modified # the return value could be a success/failure flag }
In reply to Re: Modifying a hash in a subroutine?
by mirod
in thread Modifying a hash in a subroutine?
by C_T
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |