[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: adding multi-valued attributes using Net::LDAP



On Thu, Aug 17, 2000 at 07:51:31AM +1000, Jie Gao wrote:
> Hi All,
> 
> I am sure this topic came up before, but I could not find it in the archives:
> 
> Say, I have the following attributes (same name, different values):
> 
> courses=english101
> courses=philosophy101
> courses=comp101
> ....
> 
> and I want to add them to an existing entry, using a hash.
> 
> With $ldap->add, it seems to require the key to be unique. So how do I
> go about it?

push @courses, "english101";
push @courses, "philosophy101";
push @courses, "comp101";

$entry->add( 'courses' => [ @courses ] );

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'