Shouldn't that be
print scalar( @$array[$i][$k] );
or
print $#$array[$i][$k];
to print the size out. Otherwise your printing the reference to the array, I think.
Update: oops, sorry. You're right...
Got confused with the "length of array in array of arrays". Thought that meant the array of arrays held references to arrays again...