sub getPosition{  my ($arrayref,$title,$position) = @_;  my @array = @{$arrayref};  my %hash = ();  my $ref2hash = ();  foreach my $index(0..(scalar(@array) - 1)){    my $type = ref($array[$index]);    if($type eq 'ARRAY'){      $position .= '_'.$index;      $ref2hash = getPosition($array[$index],$title,$position);      %hash = (%hash,%{$ref2hash});    }# elsif    unless($type){      my $s = $array[$index];      my $key = $title;      $key = $key.'_'.$s;      $key =~ s/\_[^\_]+$/\_$s/ if($index != 0);      $title = $title.'_'.$s if((ref($array[$index + 1]) eq 'ARRAY') && $index == 0);      $title =~ s/\_[^\_]+$/\_$s/ if((ref($array[$index + 1]) eq 'ARRAY') && $index != 0);      my $pos = $position.'_'.$index;      $title =~ s/^_//;      $key =~ s/^_//;      $pos =~ s/^_//;      $hash{$key} = $pos;    }# if  }# foreach  return \%hash; }# end getPosition