On 15/2/06 11:17, Dagnicourt <[EMAIL PROTECTED]> wrote: > Hello, > > I'am trying the sample code in the documentation, and I get this error > message :
Which documentation page is this? > Can't locate object method "entry" via package "Net::LDAP::Bind" at > ./ldap_test.pl line 7, <DATA> line 225. > Here the code : > > use Net::LDAP; > my $ldap = Net::LDAP->new ( 'myldapserver' ) or die $!; > my $mesg = $ldap->bind ( 'o=CERA,o=directoryRoot'); > if ( $error = $mesg->code ) { > print "ERROR ", $mesg->code, "\n"; > } There should be a call to search here: $mesg = $ldap->search(your args here); > $entry = $mesg->entry; According to the Net::LDAP::Search docs, this won't work. Logically speaking a search always returns an array of entries. Try: $entry = $mesg->entry(0); > $ldap->unbind; Cheers, Chris