Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Hash table manipulation

by kcott (Archbishop)
on Jul 11, 2011 at 07:01 UTC ( [id://913659]=note: print w/replies, xml ) Need Help??


in reply to Hash table manipulation

You can do something like the following one-liner (which I've split into multiple lines for readability).

$ perl -wE ' use strict; my %float_urls = (0.1 => q{A}, 0.2 => q{B}, 0.5 => q{E}); my @wanted_urls = map { $float_urls{$_} } grep { $_ > 0.4 } keys % +float_urls; say join qq{\n}, @wanted_urls; ' E

-- Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found