I second what psini says. XML::Simple considered harmful. This is the normal lifecycle with it-
- You need an XML module... Let's check CPAN.
- Wow, XML::Parser, XML::LibXML, XML::Compile, XML::Twig... Yikes. This could take hours to learn one of these. Oh, hey! XML::Simple.
- That worked great!
- Oh, but you need it a little different. So just read the XML::Simple docs. It should be simple to change.
- ...Hours go by...
- ...Things are thrown...
- ...Questions are asked at SOPW...
- Someone mentions several older threads and trying a search first next time.
- You end up getting one of the fully featured modules.
- You spend about as much time learning it as you already flushed fighting XML::Simple over whether your data are elements or attributes.
- Now you have a real skill with a powerful tool and if you picked something with a DOM standards interface like LibXML, you also just picked up a bunch of transferable skills like hacking JS.
For my own part, I find XML::LibXML, XML::Compile, XML::Twig to be the sweet spots.