From: spencer <sp...@co...> - 2000-07-25 09:55:41
|
Hi, Thanks Chris, Reda for the suggestion. I just realised that the failure to display results might actually lie elsewhere. Reading a previous email, Cliff seemed to have the same problem too. The script runs without error, but without results too(sadly). Does the following code look 'buggy'? use Net::LDAP qw(:all); use Net::LDAP::Util qw(ldap_error_name ldap_error_text); $ldap=Net::LDAP->new('coriander.mail.abs.com.my') or die "$@"; $mesg=$ldap->bind; $result=$ldap->search( base=>"o=abs,c=my", filter=>"sn=Jones", attrs=>['cn','sn'] ); print $result->entries; #print statement foreach $entry ($result->entries) { print "Entry returned with DN:",$entry->dn,"\n"; foreach $attr($entry->attributes) { foreach $val($entry->get($attr)) { print "Attribute \"$attr\" with value \"$val\"\n"; } } } My print statement to display $result->entries prints blank. I am very sure that there are such entries that I am looking for in this script. By the way, I am using perl-ldap-0.19 with Convert ASN1 module and Active Perl v5.6.0. Any problem with this, possibly? Please help. Many thank. spencer |