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=>1}; warn Dumper(\%tmp); %tmp = ( 'A' => [ [1,2] ]); XMLout(\%tmp,outputfile=>$file); %tmp = %{XMLin($file,forcearray=>1)}; warn Dumper(\%tmp);