Assuming $xmlconfig looks something like:
my $xmlconfig =
{
'order' => {
'item-info' => {
'batch' => {
'batch-member' => {
'aid' => {}
}
}
}
}
};
'batch-member' is hash reference, and not an array reference. Check the three lines after the while loop dereferencing $i:
while(my $batch_aid = $xmlconfig->{order}->{'item-info'}->{batch}->{'b
+atch-member'}->{aid}){
my $batch_pii = $xmlconfig->{order}->{'item-info'}->{batch}->{'batch
+-member'}->{$i}->{'pii'};
my $batch_pit = $xmlconfig->{order}->{'item-info'}->{batch}->{'batch
+-member'}->{$i}->{'pit'};
my $batch_doi = $xmlconfig->{order}->{'item-info'}->{batch}->{'batch
+-member'}->{$i}->{'doi'};
$orderin{$batch_aid} = { 'pit' => $batch_pit,
'pii' => $batch_pii,
'doi' => $batch_doi,
};
my $Eextra='';
$i++;
$orderin{subitem}='Yes';
}