in reply to size of array from ref

I think that $#$aref does the trick - you might need to add one to give the number of elements.