Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 rifling through the Monastery: (7)
As of 2019-12-10 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?