Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863850]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-04-28 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (521 votes). Check out past polls.