Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Bulk hash population order

by jbert (Priest)
on Nov 27, 2007 at 14:30 UTC ( [id://653246]=note: print w/replies, xml ) Need Help??


in reply to Re: Bulk hash population order
in thread Bulk hash population order

Yes, a hash slice (or a loop) is the way to go, imho.

Assuming you have the new values you want in %newbits:

@bighash{keys %newbits} = values %newbits;
or
$bighash{$_} = $newbits{$_} for keys %newbits;
Note that keys and values use the same order, so the above works.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found