http://qs321.pair.com?node_id=270408


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

I re-did the code to match you're strategy, cause I am not against changing what I am doing. This is my first time with Perl/LDAP and it is a time pressed issue so I really appreciate all you're help and guidance. After re-writing the code it is still experiencing the same issue. Here is the new code.
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'); } }


Any suggestion ?