use strict; use warnings; use XML::Simple;use Data::Dumper; my $file = './test.xml'; my %tmp = ( 'A' => [ [1] ]); XMLout(\%tmp,outputfile=>$file); %tmp = %{XMLin($file,forcearray=>['A'])}; warn Dumper(\%tmp); %tmp = ( 'A' => [ [1,2] ]); XMLout(\%tmp,outputfile=>$file); %tmp = %{XMLin($file,forcearray=>['A'])}; warn Dumper(\%tmp);