in reply to XML Module

I second what psini says. XML::Simple considered harmful. This is the normal lifecycle with it-

  1. You need an XML module... Let's check CPAN.
  2. Wow, XML::Parser, XML::LibXML, XML::Compile, XML::Twig... Yikes. This could take hours to learn one of these. Oh, hey! XML::Simple.
  3. That worked great!
  4. Oh, but you need it a little different. So just read the XML::Simple docs. It should be simple to change.
  5. ...Hours go by...
  6. ...Things are thrown...
  7. ...Questions are asked at SOPW...
  8. Someone mentions several older threads and trying a search first next time.
  9. You end up getting one of the fully featured modules.
  10. You spend about as much time learning it as you already flushed fighting XML::Simple over whether your data are elements or attributes.
  11. 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.