Please be more precise about what you are trying to do. The code you
included works fine if I use
$var1 = 'John';
$var2 = 'Smith';
on my server, I get the 2 entries just fine. I would change
unless $seen{$entry}
to
unless $seen{$entry->dn}
but I don't think that will do anything in this case.
Are you trying to find all sn/givenname combinationss where more than one
match?
--Jim
On Thu, 11 Apr 2002 CZa...@wi... wrote:
> Hello, can anyone help on this. I am trying to display duplicate enties
> that are in
> the ldap service.
>
> %seen = ();
> $mesg = $ldap->search(
> base => "o=base",
> scope => "subtree",
> filter => "(&(givenname=$var1) (sn=$var2))"
> );
>
> foreach $entry ($mesg->entries) {
> printf "%s \n", $entry->dn unless $seen{$entry}++
> }
>
>
|