Do you mean a hash or a hash or arrays? %hash = ( key => value, key2 => value2 );
%hash_of_array = ( key => "list1,list2,list3", key2 => "list1,list2,list3" ) Those are pretty easy to work with if that's what you're needing. >That would be much easier to work with if I understand what your trying to do I agree. What are you doing exactly? Making a list of ??? And trying to ??? With it? > -----Original Message----- > From: Liss, Mike [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 3:59 PM > To: 'Mark Anderson'; [EMAIL PROTECTED] > Subject: RE: Adding to multi-dimensional array dynamically via push... > > > > I am trying to create a multi-dimensional array > > $MyArray[ $SizeOfMyArray ]; > > So I can do this: > > print " $MyArray[ 0 ][ 0 ] \n"; > > > And what I want to do is add items to the array dynamically > > > > > > > -----Original Message----- > From: Mark Anderson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 1:47 PM > To: Liss, Mike; [EMAIL PROTECTED] > Subject: RE: Adding to multi-dimensional array dynamically via push... > > > > > I would like to know if it is possible to do somthing like this: ( I > > know I can't do it this way as Perl barfs when I tried it ) > > > > $SizeOfMyArray = 2; > > > > $MyArray[ $SizeOfMyArray ]; > > Why are you trying to define the size of your array? > > > push( @MyArray[ 0 ], 0 ); << --- complains here > with < ERROR > > (see below ) > > What are you trying to do? Assign '0' to the first position > of the array, or push 0 onto the array in the first position > of the array? > > The first would look like: > $MyArray[0]=0; > The second would look like: > push ($MyArray[0],0); > > > push( @MyArray[ 1 ], 5 ); > > > > foreach $item ( @MyArray ) > > { > > print " Number $item \n"; > > } > > Hope this helps, > /\/\ark > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]