From: Bob G. <go...@at...> - 2002-09-10 04:18:03
|
I believe that what you want is a reference to an array. Like this =3D=3D > my $result =3D $ldap->modify( $query->param("dn"), > changes =3D> [ > replace =3D> [ \@modattrs ] <<<<<<<<= <<<<<<<<<<< > ] > ); Sorry that I haven't tested the code out, but I don't have anNet::LDA= P distribution on this machine, at the moment. B Srini Narayanappa wrote: >=20 > Hi there, >=20 > Can anyone show me simple example of how I can replace a multi-valu= ed > attribute? For example, I need the attribute "projectIndfex" to hav= e > the folowing values: >=20 > projectIndex: 1246 > projectIndex: 9654 > projectIndex: 88 >=20 > My code below adds only the last value in the array: >=20 > ----------------------------------------- >=20 > @modattrs =3D ( 'projectIndex', "1246", > 'projectIndex', "9654", > 'projectIndex', "88" > ); >=20 > my $result =3D $ldap->modify( $query->param("dn"), > changes =3D> [ > #replace =3D> [ @$modattrs ] > replace =3D> [ @modattrs ] > ] > ); >=20 > ----------------------------------------- >=20 > Regards, > Srini >=20 > _________________________________________________________________ > Join the world=92s largest e-mail service with MSN Hotmail. > http://www.hotmail.com >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 |