in reply to size of array

Perhaps Tie::Array::BoundedIndex? Never used it, but it looks to fit the bill.