in reply to Different Strategy (Was: Net::LDAP doesn't return until end of loop)
in thread Net::LDAP doesn't return until end of loop
sub ldapsearch { my $mac = shift; print "$mac\n"; my $searchobj = $connection->search( base => 'o=ldap', scope => 'sub', filter => "cn=$mac", attrs => @attrs, #note I al +so tried \@attrs ); $searchobj->code && die $searchobj->error; while ( my $entry = $searchobj->shift_entry) { print $entry->dn, "\n"; print $entry->get_value('plan'); print $entry->get_value('ipaddress'); print $entry->get_value('username'); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Different Strategy (Was: Net::LDAP doesn't return until end of loop)
by lachoy (Parson) on Jul 01, 2003 at 12:21 UTC |