> my $result = $ldap->add ( $dn, attrs => [ @$whatToCreate ] );

Since I think you've defined $CreateArray as a reference to an array, you
should be able to say:

    my $result = $ldap->add ( $dn, attrs => $CreateArray );

> However, how do I dynamically add multiple values to mail?
> I have one to many mail addresses stored in an array:  @mail.
> Can anyone point me in the right direction?

The objectClass attribute is multi-valued, so you can use the same
technique
for any multi-valued attribute:

    mail => [ '[EMAIL PROTECTED]', '[EMAIL PROTECTED]' ]

Cheers,

Chris

-------------------------------------------

Chris,

Thanks for your reply.
What I mean is How do I set an array full of values into the multi-valued
attribute?  I have an array "@mail"  which contains the values.
How do I assign them to "mail =>"?
 I tried   "mail => @mail" but that does not seem to work.

Thanks.

Reply via email to