Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: map {} list or do {} for list?

by Laurent_R (Canon)
on Apr 11, 2014 at 17:41 UTC ( #1082003=note: print w/replies, xml ) Need Help??


in reply to map {} list or do {} for list?

Or copying the hash onto itself, so to speak:
%hosts = map { $hosts{$_} == $table_count ? ($_, $hosts{$_}) : ()} key +s %hosts;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2020-11-27 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?