Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: grep for hash?

by Anonymous Monk
on Jul 07, 2009 at 12:44 UTC ( [id://777862]=note: print w/replies, xml ) Need Help??


in reply to Re: grep for hash?
in thread grep for hash?

Should be :D  /oo/ and $dest->{$_} = $orig->{$_} for keys %$orig;

Replies are listed 'Best First'.
Re^3: grep for hash?
by ikegami (Patriarch) on Jul 07, 2009 at 15:43 UTC

    Written like it's said, "Copy each selected key":

    $dest->{$_} = $orig->{$_} for grep /oo/, keys %$orig;

    There's no need to twist one's mind to process the parent's expression.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-19 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found