XML::Simple isn't. The immediate problem is a need to use ForceArray. However your code can stand a fair bit of tidying up generally. There is no need to use prototypes. You should avoid overloading identifiers (r used for the name of two different subs especially is nasty). Identifiers generally should indicate their purpose. Consider:

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other