From: Kjetil T. H. <kje...@li...> - 2002-01-18 04:16:36
|
Bob...@kp... writes: > The size limit is imposed on the Server side, sigh. > > for i ("a" .. "z") { > > $filter = "mailhost=ms001" . $i . "dc3.adelphia.net"; This filter should be immutable if I read the OP correctly. Something like $filter = "(|(mailhost=ms001a.dc3.adelphia.net)(mail=$i*))"; may make more sense. It would also be pertinent to specify a smaller set of attributes to reduce the load on the server and network. You can also use a trivial callback function to reduce memory requirements on the client. (Otherwise Perl will need to hold _all_ entries in memory.) $count = 0; $message = $ldap->search( base => ("$ouline,$oline"), scope => 'sub', filter => ("$filter"), attrs => [ "objectClass" ], callback => sub { $_[0]->pop_entry; ++$count }, ); > (Coded, but not verified.) Ditto :-) The callback really should handle the case where $_[1] isn't an Net::LDAP::Entry (e.g. is a reference). Kjetil T. |