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 ) = @_;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Modify a hash via its reference
by bradcathey (Prior) on Jan 24, 2008 at 03:26 UTC |
In Section
Seekers of Perl Wisdom