How to replace multiple values of an attribute

Oliver Dörr <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
Hi,

I spent my whole afternoon searching for a solution for replacing all 
values of an attrbute by an array.

So what i got is basicly an reference $values to an array of my new 
values. I could iterate through the array using
foreach my $value (@$values) {...}

The code that works is:
my $mesg1=$backendConn->modify($dn,
                                        replace => [$attr, ["Hello", 
"Test"]]
                                         );

But i need to be more flexible and tried today a lot of variations of...
my $mesg1=$backendConn->modify($dn,
                                        replace => [$attr, @{$values}]
                                         );

This gave me the error...
Attribute <one of the values in my array> was not found in the schema 
definition.
inside the LDAP Server

$attr is a string that contains the name of the attribut.

Could somebody help me?
Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.