----- Forwarded message from Daniel Cheung <ti...@ho...> -----
Date: Tue, 02 Apr 2002 16:11:16 -0500
To: gb...@po...
From: "Daniel Cheung" <ti...@ho...>
use Net::LDAP;
Dear Graham:
You did a good job on Perl LDAP. However, when I try to use your following
code:
$ldap = Net::LDAP->new($host);
$mesg = $ldap->search(@search_args);
my $max = $mesg->count;
for($i = 0 ; $i < $max ; $i++) {
my $entry = $mesg->entry($i);
foreach my $attr ($entry->attributes) {
print join("\n ",$attr, $entry->get_value($attr)),"\n";
}
}
I got strange output like these:
objectClass, Net::LDAP::Entry=HASH(0xcb99c)->get_value('objectClass')
rdn, Net::LDAP::Entry=HASH(0xcb99c)->get_value('rdn')
cn, Net::LDAP::Entry=HASH(0xcb99c)->get_value('cn')
rfc822Mailbox, Net::LDAP::Entry=HASH(0xcb99c)->get_value('rfc822Mailbox')
mail, Net::LDAP::Entry=HASH(0xcb99c)->get_value('mail')
textEncodedORaddress,
Net::LDAP::Entry=HASH(0xcb99c)->get_value('textEncodedORaddress')
otherMailbox, Net::LDAP::Entry=HASH(0xcb99c)->get_value('otherMailbox')
givenName, Net::LDAP::Entry=HASH(0xcb99c)->get_value('givenName')
uid, Net::LDAP::Entry=HASH(0xcb99c)->get_value('uid')
MAPI-Recipient, Net::LDAP::Entry=HASH(0xcb99c)->get_value('MAPI-Recipient')
sn, Net::LDAP::Entry=HASH(0xcb99c)->get_value('sn')
telephoneNumber,
Net::LDAP::Entry=HASH(0xcb99c)->get_value('telephoneNumber')
co, Net::LDAP::Entry=HASH(0xcb99c)->get_value('co')
It seems that the get_value function is not working? Could you please tell
me why?
Thanks
Dan
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
----- End forwarded message -----
|