in reply to Re^4: hash from xml::simple
in thread hash from xml::simple

It didn't turn apple into an array with sqr brackets.

That's not what I said. I said KeyAttr turned apple's square brackets into what you wanted. (The default appears to be KeyAttr => 'name'.)

The square brackets is what you have before XML::Simple starts messing around with your tree. ForceArray prevents the flattening of the arrays that occur when they only have one element.