Re: COMPLEX ARRAY STRUCTURE

2004-08-12 Thread Luis Daniel Lucio Quiroz
Thks, Your first solution help me, I do a hash from anonymous array, then I modified and return to a anonymous array and ldapadd works well. thsks. LD El Mar 10 Ago 2004 07:12, Ramprasad A Padmanabhan escribió: > Luis Daniel Lucio Quiroz wrote: > >You are wrong, > > > >I need some more flexibl

Re: COMPLEX ARRAY STRUCTURE

2004-08-10 Thread Ramprasad A Padmanabhan
Luis Daniel Lucio Quiroz wrote: You are wrong, I need some more flexible, I dont know what attributes will be added, that's why I need array be coded on fly,with somthin like this $result = $ldap->add( 'cn=Barbara Jensen, o=University of Michigan, c=US', attr =>$attrs); so $attrs array is f

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Chris Devers
On Mon, 9 Aug 2004, Luis Daniel Lucio Quiroz wrote: You are wrong, I see. Good luck figuring it out then! -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Luis Daniel Lucio Quiroz
You are wrong, I need some more flexible, I dont know what attributes will be added, that's why I need array be coded on fly,with somthin like this $result = $ldap->add( 'cn=Barbara Jensen, o=University of Michigan, c=US', attr =>$attrs); so $attrs array is formed on user commands :-P

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Chris Devers
On Mon, 9 Aug 2004, Luis Daniel Lucio Quiroz wrote: Yes I do, I need array not to be hard-coded So don't hard-code it then. Just modify the update command the library provides so that it does what you need it to do. Manually poking at the data structure that a library uses internally is a BAD i

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Luis Daniel Lucio Quiroz
Yes I do, I need array not to be hard-coded El Lun 09 Ago 2004 10:05, Chris Devers escribió: > On Mon, 9 Aug 2004, Luis Daniel Lucio Quiroz wrote: > > And Ramprasad is write, it's a LDAP-Perl scructure. I need to > > construct this structure on fly when executin a script. So I wish > > first h

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Chris Devers
On Mon, 9 Aug 2004, Luis Daniel Lucio Quiroz wrote: And Ramprasad is write, it's a LDAP-Perl scructure. I need to construct this structure on fly when executin a script. So I wish first how to access. So, lets tell I want to add another element. After doing: my %hash = @{$a}; Did you try a `p

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Luis Daniel Lucio Quiroz
yes, I'm pretty sure. And Ramprasad is write, it's a LDAP-Perl scructure. I need to construct this structure on fly when executin a script. So I wish first how to access. So, lets tell I want to add another element. After doing: my %hash = @{$a}; I do: $hash{'initials'} = "S"; ?

Re: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Ramprasad A Padmanabhan
This seems to be the result of a Net::LDAP search. I would suggest you better read the perldoc for the module , there are methods to directly give you the cn, sn etc from the entry. That way even if you upgrade the module and if the structure of the object changes you wont have to change any of y

RE: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Tim Johnson
Are you sure you want that top level to be an anonymous array instead of a hash? This would make more sense (see below for how to access the values). Note the {} brackets instead of the [] brackets. # my $a = {'cn' => ['Barbara Jensen',