in reply to Modify a hash via its reference
That way, you're saying "update the hash pointed to by $Ref_to_Hash".sub Modify_Hash_1 { my ( $Ref_to_Hash ) = @_; # Note, _NOT_ {} - must be assigning a hash, # not a hash ref %{$Ref_to_Hash} = ( "Pears", 5, "Peaches", 7 ); };
I recommend the perlref and perldsc perldoc pages - they'll help you wrap your mind around references.
|
|---|