in reply to Populating Hash passed to a sub as reference
which passes a reference to %hash to the subroutine PopulateHash.PopulateHash(\%hash);
You create a new hash, %hash1, which is a copy of the old, %hash. Both are empty in this case.
The changes in the subroutine are made to the new hash, which is a separate from the original. That's why you don't see the changes in the main program.my %hash1 = %$hashParm;
|
|---|