Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Taking a subset of a hash

by james2vegas (Chaplain)
on Oct 30, 2010 at 13:18 UTC ( #868468=note: print w/ replies, xml ) Need Help??


in reply to [Answered!] Taking a subset of a hash

@small_hash{@interesting_keys} = @$config{@interesting_keys}; delete @small_hash{ grep { ! $config->{$_} } keys %$config };
should work


Comment on Re: Taking a subset of a hash
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-07-30 04:22 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 (269 votes), past polls