in reply to Putting weird things into $#array

...made me wonder if I could write $#{$#a} for an array @a and have it actually do something.

If you just want $#{$#a} to make sense, then there is another possibility:

As we are allowed to name arrays with numbers, $#a could in fact be the name of an array. Not using strict, you may use $#{$#a} to get the highest index of that very array:

@a = (0..4); @4 = (0..17); print $#{$#a};

This in fact prints 17, the highest index of the array @4.