when i'm doing an LDAPsearch manually on the commandline, i can do it so that the filter attribute can come off a file like this :
ldapsearch -v -h <host> -D "<DN>" -b "OU=myou,DC=mydc" -f myqueries.txt "(cn=%s)"
myqueries.txt contains entries such as :
name1
name2
nameN
now i'm trying to do the same thing in Perl using Net::LDAP and i couldn't find any option like that in the documentation. do you know if it can do it ?
in the worst case, i know that i can probably create an array of records (containing queries) and make a loop with many ldapsearches on these names, it will work, but i'd prefer doing something easier with a net::ldap attribute if it is possible (less code)
e.g.
$data = $ldap->search(
base => $dn,
scope => 'one',
pagesize => '999',
filter => '(cn=%s)',
file => 'myqueries.txt', # this option does not exist
attrs => [ qw( displayName cn ) ]
);
thanks !