From: Cox, T. (NCI) <tc...@ma...> - 2002-01-16 15:21:24
|
I believe you need to change $mesg->all_entries to $mesg->entries. Todd Cox National Cancer Institute Rockville, MD -----Original Message----- From: Graham Barr [mailto:gb...@po...] Sent: Wednesday, January 16, 2002 10:15 AM To: LDAP Mailing List Cc: CZa...@wi... Subject: [Fwd] getting Net::LDAP search results ----- Forwarded message from CZa...@wi... ----- Date: Wed, 16 Jan 2002 10:09:05 -0500 To: gb...@po... From: CZa...@wi... Subject: getting Net::LDAP search results X-Mailer: Lotus Notes Release 5.0.2c February 2, 2000 Hello Graham, how do I obtain this info "CN=John Doe,OU=IT,OU=NewYork,O=XYZ" using the example below ? I would figure that $mesg would return this information back from the search. Please help. Thank you. $ldap->bind ; $mesg = $ldap->search( base => 'o=wiley', scope=> 'subtree', filter=> "(&(objectclass = interorgperson) (mail = $username))" ); $mesg->code && die $mesg->error; foreach $entry ($mesg->all_entries) { $result = $entry->dn; print "$result\n"; } $ldap->unbind; ----- End forwarded message ----- |