Amblikai has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks, probably a rubbish title but i was wondering if these 2 scenarios are equivalent:
Scenario 1:
Scenario 2:my %other_hash=( param1 => val1, param2 => val2 ); my %hash=( key1 => value, key2 => \%other_hash );
Will the value for key2 be the same in both cases? (A hash reference?) Thanks.my %hash=( key1 => value, key2 => ( param1 => val1, param2 => val2 ) );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: autovivication and referencing
by hdb (Monsignor) on Nov 20, 2013 at 13:28 UTC | |
by Amblikai (Scribe) on Nov 20, 2013 at 13:37 UTC | |
by hdb (Monsignor) on Nov 20, 2013 at 13:39 UTC | |
by Amblikai (Scribe) on Nov 20, 2013 at 13:53 UTC | |
Re: autovivication and referencing
by eye (Chaplain) on Nov 20, 2013 at 15:32 UTC | |
Re: autovivication and referencing
by sundialsvc4 (Abbot) on Nov 20, 2013 at 14:11 UTC | |
Re: autovivication and referencing
by thakares (Acolyte) on Nov 20, 2013 at 16:45 UTC |
Back to
Seekers of Perl Wisdom