in reply to Is using $#array Frowned on?

$#array is perfectly acceptable for getting the value of @array's last index (i.e., the subscript of the last element).