From: Werner R. <we...@pu...> - 2000-10-15 10:48:21
|
On Fri, Oct 13, 2000 at 04:03:25PM -0500, Mark Wilcox wrote: > The value of the hash would have to contain an array. > > like this: > my $array = ['value','value','value']; > or > $array->[0] = 'value'; > $array->[1] = 'value'; OK, this way I could create several attribute/value pairs where the attribute (key) doesn't change but I want to have several different attributes in my hash. Example: dc => 'mydom.com', sn => 'Brown', cn => 'C B' I want to put these attribute/value pairs into a structure (hash ...) and supply this structure to the attrs method to avoid writing each attribute/value pair seperately: $ldap->add ( dn => $dn, attrs => [%myhash] ); I used an array of anonymous hashes and an array and a hash within the anonymous array. First case doesn't work at all, in the last two trials only one attribute is added to the entry. Werner |