in reply to ldap search question
Net::LDAP supports that feature via the attrs parameter. For instance:
$mesg = $ldap->search( base => "o=acme.com", scope => 'sub', filter => "sn=smith", attrs => [qw(sn givenName department)] ); [download]