From perldoc XML::Simple
ForceArray => 1 (in) (IMPORTANT!)
This option should be set to ’1’ to force nested elements to be
represented as arrays even when there is only one. Eg, with
ForceArray enabled, this XML:
would parse to this:
’name’ => [
instead of this (the default):
’name’ => ’value
This option is especially useful if the data structure is likely to
be written back out as XML and the default behaviour of rolling
single nested elements up into attributes is not desirable.
Setting that option will make it easier to not mangle your XML. But XML::Simple
shows its limitations when you try use it to write your XML. It's really best when used as it was originally intended, as a config reader.