XML::Simple represents one XML element as a hash. If you have two elements with the same XML tag name then they will be represented as an array of hashes. 'Folding' refers to transforming the array of hashes into a hash of hashes where the hash key is the value of a common attribute. In your example XML (which is badly malformed), the item elements do not all have a common 'name' - some have name and some have exec.
I suggest you read this article and if you have further problems, ask on PerlMonks rather than on this site.