in reply to hashref with(out) arrays
Since you're probably using XML::Simple, use ForceArray=>1 so the data structure it returns always contain arrays.