Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 cooling their heels in the Monastery: (14)
As of 2014-09-19 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls