You're making the changes to a (shallow) copy of $hash_ref, %temp_records, which gets discarded when the subroutine ends. Just make the changes directly to $hash_ref, e.g. $hash_ref->{"foo"} = "bar";. See perlreftut and perlref for more information on using references.
In reply to Re: Sending a hash reference to a subroutine, and retain its values after returning from that subroutine
by Anonymous Monk
in thread Sending a hash reference to a subroutine, and retain its values after returning from that subroutine
by estreb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |