my $aref = $hoa->{keytwo}; my ($color, $fruit) = ( ${$aref}[$idx_color], ${$aref}[$idx_fruit] );