http://qs321.pair.com?node_id=1215873


in reply to Re^4: A more elegant way to filter a nested hash?
in thread A more elegant way to filter a nested hash?

FWIW, the current syntax for that slice in Perl 6 is:

%other = %sounds<lizard duck>:p

The :p indicates it should slice out Pairs, which will populate the result hash. If you want to immediately remove the slice from the source hash, you can do:

%other = %sounds<lizard duck>:p:delete

The :delete indicates you want those elements deleted from the hash.