How would the following code be coverted to use Perl-LDAP?
 
my $ldapmodify  = "ldapmodify -h $ldap_master -x -c";
my $context = "ou=test,ou=ncr,o=pwgsc";
my $new_ou = "test";
 
open  (LDAP, "|".$ldapmodify);
print  LDAP "dn: $context\n";
print  LDAP "changetype: add\n";
print  LDAP "objectclass: organizationalunit\n";
print  LDAP "ou: $new_ou\n";
close (LDAP);
 
 
Thanks.

Reply via email to