Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: A more elegant way to filter a nested hash?

by liz (Monsignor)
on Jun 04, 2018 at 19:15 UTC ( #1215873=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2020-10-27 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (256 votes). Check out past polls.

    Notices?