It's to do with operator priority.
Try as
($datahash[$currentdisk])[1]
What is in the parenthesis will return the array, then you take the 2nd (index 1) element of that array
It's to do with operator priority.
Try as
($datahash[$currentdisk])[1]
What is in the parenthesis will return the array, then you take the 2nd (index 1) element of that array