in reply to Merging hash

Be aware that if the two smaller hashes contain the same key, then the value that ends up in the composite hash will depend upon the order you list the smaller hashes in the composing statement:

@val=({23=>1, 43=>1, 34=>1, 66=>1, 99=>1},{33=>1, 64=>1, 35=>1, 54=>1, + 78=>1});; pp \@val;; [ { 23 => 1, 34 => 1, 43 => 1, 66 => 1, 99 => 1 }, { 33 => 1, 35 => 1, 54 => 1, 64 => 1, 78 => 1 }, ] $val[2] = { %{ $val[0] }, %{ $val[ 1 ] } };; pp \@val;; [ { 23 => 1, 34 => 1, 43 => 1, 66 => 1, 99 => 1 }, { 33 => 1, 35 => 1, 54 => 1, 64 => 1, 78 => 1 }, { 23 => 1, 33 => 1, 34 => 1, 35 => 1, 43 => 1, 54 => 1, 64 => 1, 66 +=> 1, 78 => 1, 99 => 1 }, ]

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Merging hash
by arivu198314 (Sexton) on Oct 04, 2011 at 11:19 UTC

    It's working :)