I am not sure what you are trying to do. Strictly speaking, perl does not have such a thing as a "multidimensional array". It simulates it very well with an "array of arrays" (or more accurately, an array of array references). You are storing a string in the $ii element of the array @mtab. In the next statement, you use the syntax for "array of arrays". Perl expects that $ii element to contain a reference to one of several arrays (with $jj as the index into that array). The message is telling you that the main array contains the string you stored there rather than a reference. I cannot give you the correct syntax without knowing what you are trying to do. I suspect that a hash would be a better data structure.