Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 rifling through the Monastery: (10)
As of 2014-10-31 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (217 votes), past polls