in reply to Re: Modify a hash via its reference
in thread Modify a hash via its reference
No need for the "()" around a single my variable declarationThis is true in most situations but not all. From the OP's code:
In this style of parameter initialization, the parentheses are in fact required. Otherwise $Ref_to_Hash will be assigned the number of arguments, not the value of the first one.my ( $Ref_to_Hash ) = @_;
In Section
Seekers of Perl Wisdom