On 8/3/06, Alexander Foken <[EMAIL PROTECTED]> wrote:
First, add "use strict;" and "use warnings;" to your script. $mesg->code() returns true (defined value, not zero and not an empty string) and $mesg->error() returns "No such object".
I am still getting "No such object" error on the same line. I was querying my ldap entry and I know I exist ;-) Alexander
Asif Iqbal wrote: > Can you tell why $mesg->code && die $mesg->error; is giving the > following > error? > > No such object at ./mutt-ldap.pl line 11, <DATA> line 225 > > > #! /usr/bin/perl > > use Net::LDAP; > > $ldap = Net::LDAP->new('localhost:9389') or die "$@"; > > $mesg = $ldap->bind ; > > $mesg = $ldap->search(base => "ou=uswest.com", filter => "(uid=iqbala)"); > > $mesg->code && die $mesg->error; > > foreach $entry ($mesg->entries) { $entry->dump; } > > $mesg = $ldap->unbind; > -- Alexander Foken mailto:[EMAIL PROTECTED] http://www.foken.de/alexander/
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu