Maybe I'm missing something, but wouldn't $#array give you the length of the array? n-dim arrays are really simple arrays, all of whose elements are references to arrays (and so forth for dimensions > 2). Thus, the length is the size of outer-most array. Right?