http://qs1969.pair.com?node_id=777862


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.