Right now, I'm taking care of some horrible code written before I got here. It relies on `ldapsearch` far too much for a perl script that says "use Net::LDAP" at the top.
Anyway, my problem is, when the current code goes to change a username, he dumps it out to LDIF (one-long-string-argument "system" call here...) and iterates over the file doing global replacements: $line =~ s/$uid/$new_uid/g and then deletes the entry with ldapdelete and dumps it back in with ldapadd. Whatever. Totally wrong methods. My replacement architecture can grab an entry and I can modify it to my hearts content using the right Net::LDAP calls. This brings me to my question: What's the easiest/most correct way of going over all the values in a Net::LDAP::Entry and doing the global replacement? The manpage scares me with it's talk of not modifying the asref=>1 objects directly. Pi -- Q: How many object oriented perl programmers does it take to screw in a light bulb? A: HASH(0x814f708)