9 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9
my $CreateArray = [ objectClass => [ "top", "person", "organizationalPerson", "inetOrgPerson" ], cn => "Jane User", uid => "0000001", sn => "User", mail => "JaneUser\@mycompany.com" ]; print "@$CreateArray[2]\n";
Ted+2008-09-23 08:19:50--Code (perl): (dl )1 2 3 4 5 6my $CreateArray = [ objectClass => [ "top", "person", "organizationalPerson", "inetOrgPerson" ], ... ]; print "@$CreateArray[2]\n";
1 2 3 4
my $CreateArray = [ 'objectClass', [ "top", "person", "organizationalPerson",...] ... ];
FIFO+2008-09-23 09:13:41--..., aber die genannte Konstruktion mit Absicht zu verwenden, ist schon mutig ;-)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# create the new DN to look like this # " cn=Jo User + uid=0000001 , ou=bailiwick, o=mycompany, c=mycountry " my $NewDN = "@$CreateArray[2]=". "@$CreateArray[3]+". "@$CreateArray[4]=". "@$CreateArray[5],". $DNbranch; LDAPentryCreate($ldap, $NewDN, $CreateArray); # # CreateArray is a reference to an anonymous array # you have to dereference it in the subroutine it's # passed to. # sub LDAPentryCreate { my ($ldap, $dn, $whatToCreate) = @_; my $result = $ldap->add ( $dn, attrs => [ @$whatToCreate ] ); return $result; }
9 Einträge, 1 Seite |