Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: stuck in a hash

by Eimi Metamorphoumai (Deacon)
on Aug 04, 2005 at 21:08 UTC ( #481023=note: print w/replies, xml ) Need Help??


in reply to stuck in a hash

I can't quite figure out if you want the elements in the array but not the hash, or in the hash but not the array. But here's how to get both.
my @not_in_hash = grep {!exists $hash{$_}} @all_ids; my %only_in_hash = %hash; #make a copy first delete @only_in_hash{@all_ids};

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2020-10-29 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (266 votes). Check out past polls.

    Notices?