Scot Robnett wrote:
> Anything I can do to make this an easier question? No
> responses...maybe I didn't ask the question the right way or made it
> confusing as to what I am trying to do? Would it help to split it up?
> Thanks for any advice...
>
> ...
> foreach $record(sort(@records)) {
> chomp($record);
> ($comp,$addr) = split(/\|/, $record);
> @emails = split /:/, $addr;
>
> # Right here, I want to see if any of the addresses
> # in @addresses match an address in @emails for this # particular
> $record.
Turn @addresses into a hash (do this ouside the loop of course):
my %addresses = map ($_, 1), @addresses;
Then, to remove entries in @emails that exist in @addresses:
@emails = grep !exists($addresses{$_}), @emails;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]