rbi has asked for the wisdom of the Perl Monks concerning the following question:
outputs: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);
How do I force the value of key A to be an array of array also in the first case ?$VAR1 = { 'A' => [ { 'anon' => '1' } ] }; $VAR1 = { 'A' => [ [ '1', '2' ] ] };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Forcing to anonymous array in XML::simple
by grep (Monsignor) on Dec 14, 2006 at 15:54 UTC | |
by rbi (Monk) on Dec 14, 2006 at 16:47 UTC | |
by grep (Monsignor) on Dec 14, 2006 at 18:03 UTC | |
by rbi (Monk) on Dec 15, 2006 at 09:33 UTC |