in reply to Re^2: XML::Simple parsing into a hash wierd behaviour
in thread XML::Simple parsing into a hash wierd behaviour
Did you try it?
Without ForceArray => [qw( type )]:
$VAR1 = { 'type' => { 'scenario1' => { 'report' => 'Dummy2' }, 'default' => { 'report' => 'Dummy1' } } }; $VAR1 = { 'type' => { 'report' => 'Dummy1', 'name' => 'default' } };
With ForceArray => [qw( type )]:
$VAR1 = { 'type' => { 'scenario1' => { 'report' => 'Dummy2' }, 'default' => { 'report' => 'Dummy1' } } }; $VAR1 = { 'type' => { 'default' => { 'report' => 'Dummy1' } } };
That's exactly the output the OP requested.
|
|---|