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.
In reply to Re^3: grep for hash?
by ikegami
in thread grep for hash?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |