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"; ??? If I heed an array shoul I do: $hash{'telephone'}=['55555555','33333333']; and because it's a anonymous reference $a var is update automatly? Merci beacoupe LD El Lun 09 Ago 2004 03:32, Tim Johnson escribió: > 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', > 'Barbs Jensen'], > 'sn' => 'Jensen', > 'mail' => '[EMAIL PROTECTED]', > 'objectclass' => ['top', > 'person', > 'organizationalPerson', > 'inetOrgPerson' ], > }; > > print $a->{objectclass}->[3]."\n"; #inetOrgPerson > print $a->{sn}."\n"; #Jensen > > ##################################### > > > > > > > > -----Original Message----- > From: Luis Daniel Lucio Quiroz [mailto:[EMAIL PROTECTED] > Sent: Sunday, August 08, 2004 5:50 PM > To: [EMAIL PROTECTED] > Subject: COMPLEX ARRAY STRUCTURE > > Hi, > > $a = [ > 'cn' => ['Barbara Jensen', 'Barbs Jensen'], > 'sn' => 'Jensen', > 'mail' => '[EMAIL PROTECTED]', > 'objectclass' => ['top', 'person', > 'organizationalPerson', > 'inetOrgPerson' ], > ]; > > > I have this arrary structure, how should I read it? For example how do > I > acces to "inetOrgPerson' value or Jesen value? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>