@attr_list = ('cn','fonDeptName','telephoneNumber','l','st','fonManagerDN=cn'); # print column header print LDAPFILE "InputValue:cn:fonDeptName:telephoneNumber:l:st:fonManagerDN=cn\n"; # ************** End of configuration section *********************** # ******************************************************************* # ************** Initialization ****************** # Set up a search pattern that will recognize any attribute. $attrs = join(':', @attr_list); # Create the global variables with an assignment to null. foreach $attr (@attr_list) { ${$attr} = ""; } #print "Bind using server $ldap_server and ID of $bind_dn\n"; # establish LDAP connection $ldap = Net::LDAP->new($ldap_server); unless ($ldap){ my $errmsg = $@; print STDERR "Failed to open LDAP session. Error = $errmsg\n"; exit; }