tux242 has asked for the wisdom of the Perl Monks concerning the following question:
Tux242 bites down hard on the bit to prepare for another flogging and loss of XP
Hello, I have a question about pulling from LDAP or metadirectories in the code below I am having problems pulling one of the attributes, fonManagerDN=cn, the cn is the end result of what I want from the fonManagerDN itself not the whole listing, can anyone tell me where I am going wrong? This is more or less a sub of a sub but I can not seem to get the syntax right. The rest of the attributes work fine.
@attr_list = ('cn','fonDeptName','telephoneNumber','l','st','fonManage +rDN=cn'); # print column header print LDAPFILE "InputValue:cn:fonDeptName:telephoneNumber:l:st:fonMana +gerDN=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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pulling LDAP structure
by sauoq (Abbot) on Nov 21, 2003 at 00:12 UTC | |
|
Re: pulling LDAP structure
by Roger (Parson) on Nov 21, 2003 at 00:30 UTC | |
|
Re: pulling LDAP structure
by sauoq (Abbot) on Nov 21, 2003 at 00:04 UTC |