"R. Joseph Newton" wrote:

> Chris wrote:
>
> > my %found = ();
> > foreach (@emails) { $found{$_}++ };
> > foreach (@exclude) { exists $found{$_} and delete $found{$_} }
>
> Too complicated.  Check Wolf's suggestion:

Ooops, excuse the brain fart:

>
> $unwanted{$_} = 1 foreach @exclude;
> my @temp;
> #   push @temp  this was leftover from some indecison.  Sorry
> while (my $email = shift @emails) {
>    push @temp, $email unless $unwanted{$email};
> }
> @emails = @temp;
> @temp = undef;
>

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to