in reply to last index of array ref...

$# works pretty much the same way @ does. You can stick either of them on a scalar variable hashref or on an array name.

Caution: Contents may have been coded under pressure.