Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: update a hash with a hash

by rjbs (Pilgrim)
on Jul 15, 2004 at 02:33 UTC ( #374497=note: print w/ replies, xml ) Need Help??


in reply to update a hash with a hash

It's not as efficient as friedo's solution, but I generally find myself writing:

%hash1 = (%hash1, %hash2);
In other words, "hash1 is itself, plus all of hash2, using hash2's values where they conflict."
rjbs


Comment on Re: update a hash with a hash
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://374497]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2015-07-31 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls