Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Checking contents of array against contents of a hash

by hbm (Hermit)
on Oct 06, 2010 at 18:33 UTC ( #863850=note: print w/ replies, xml ) Need Help??


in reply to Checking contents of array against contents of a hash

Can you make the dlists hashes instead of arrays? Then you could check something like this:

if (!grep {!exists $user_hash{$dlist_name}{$_}} @emails) { # flag 'all users' }

That would have the advantage of deduping your dlists; where with an array you probably ought to check before pushing.


Comment on Re: Checking contents of array against contents of a hash
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2014-08-01 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (27 votes), past polls