It's late and I can't see your problem, I guess, but a couple notes.

You're liable to get the On Useless Cats award of the week from Merlyn.   Why would you say "cat file | grep 'thing'" when you could just say "grep 'thing' file" ?

And when you do search for a user name in users.txt, wouldn't you like to make sure you get the _right_ user?   Suppose there's a user 'roo' - you wouldn't want to delete 'root' by mistake would you?   You should be more careful in your grep to limit how you match things.   Even using '-w' isn't good enough.   What if there were an email address "roo@where.ru" for some other user?

Could it be that some of your email addresses are more complex than just "user@domain.tld"?   Maybe you should accept a larger set of email address patterns?

Any chance you could have casing problems, such that a user name in one of the three locations, %postiniList or %ldapList or users.txt, could be upper- vs. lowercase elsewhere?

You might have to show us more code and more of the actual data.   And what does "messing it all up!" mean?


In reply to Re: hash comparison & nested selections by shenme
in thread hash comparison & nested selections by silentc

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.