my $rate = join ',',@{$taxHash->{$id}{state}}; $merchant->appendTextChild('StateTax', $rate);