CC: | Fredrik Lysén <fredrik.lysen [...] uadm.uu.se> |
Subject: | Net::LDAP and array |
Date: | Wed, 26 Apr 2017 14:57:20 +0000 |
To: | "bug-perl-ldap [...] rt.cpan.org" <bug-perl-ldap [...] rt.cpan.org> |
From: | Fredrik Lysén <fredrik.lysen [...] uadm.uu.se> |
perl -v
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi (with 58 registered patches, see perl -V for more detail)
uname -a
Linux its-048568 4.8.0-45-generic #48~16.04.1-Ubuntu SMP Fri Mar 24 12:46:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Show quoted text
________________________________________________________________________
When search AD and receive the attrib "members" I expect to get the list of members in an array so I can do a "foreach... {....}". But I just get all members in the same position [0].
Is this the correct behavior?
Best regards
Fredrik
________________________________________________________________________
my $result = $ldap->search(
base => "OU=ITSD,OU=Groups,OU=Core,DC=nnnn,DC=nn,DC=nn",
scope => "sub",
filter => "($serach_string)",
attributes => ['member'],
);
printf "COUNT: %s\n", $result->count;
my @entries = $result->entries;
foreach my $entr ( @entries ) {
print $entr->get_value("member");
}
________________________________________________________________________