> 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]