I'm doing migration across directories and encountered some problem.
My requirement is as follows.
There's an entry with dn pointer followed by a multivalued attribute.
appprofile: cn=hlambert-CCNProfile,ou=profiles,ou=CCN,o=myServer.com
appprofile: ou=MA,ou=hlambert_info,ou=user_info,ou=CCN,o=myServer.com
I'm using perl-ldap using which I dump all the information into a ldif file and then I've to replace the string ou=CCN,o=myServer.com for which the string can be passed from an INI file.
I'm using the the get_value('appprofile',asref=>1) and I believe it returns an array. I want to modify the entries in the array so that the "search string" is replaced by "new string" and after that I create the entry and write it into another ldif file using which I'm exporting the data.
My question is
- Can I modify the individual entries in the array if so how ( I tried normal array element replace but it didn't work)
- When I refer to the return value of get_value say $attrValue ( with no/default option), then I could change the value only for the first element and the second value of the attribute is not written into the ldif file.
- any pointers on this will be higly appreciated.