Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
It gives me an error in the second case, and the only difference I could think of is that the keys are strings of formatted numbers...use strict; use warnings; use XML::Simple; my %h = ( 'name' => 'my name', 'values' => { 'A' => 'a', 'B' => 'b', 'C' => 'c', }, ); XMLout(\%h,outputfile=>'./test_ok.xml'); my %g = %{XMLin('./test_ok.xml')}; print "ok, so far\n"; %h = ( 'name' => 'my name', 'values' => { '01' => 'a', '001' => 'b', '0001' => 'c', }, ); XMLout(\%h,outputfile=>'./test_ko.xml'); %g = %{XMLin('./test_ko.xml')};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: writing hashes with XML::Simple
by jeffa (Bishop) on Jul 11, 2004 at 15:53 UTC | |
by grinder (Bishop) on Jul 11, 2004 at 20:42 UTC |