Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Hash filter one-liner not working as expected

by vr (Curate)
on Mar 17, 2019 at 11:56 UTC ( [id://1231356]=note: print w/replies, xml ) Need Help??


in reply to Re: Hash filter one-liner not working as expected
in thread Hash filter one-liner not working as expected

You had syntax for something else. If number of hash elements was odd, Perl would have warned you sooner than you loose 25 minutes, it was simply bad fortune. Btw, it could be:

my %colors = %$hash{ grep /color$/, keys %$hash };

with use 5.020; to warn would-be users.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-28 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found