in reply to Get key and value pair from hash without loop

Hint: $key = $aref->[0];