You could be running into a memory-problem in any one of three places:
- The CSV import.
- The XML translation.
- An unknown bug in a module that hasn’t been attended-to in a long time.
-
In this case, I think I would just resort to my own logic ... using CPAN modules to do all the heavy-lifting but not to perform the entire task. For instance, use a CSV module to read the file line-by-line. Now, build an in-memory hash structure conforming to the XML structure you want to build. (Pause and verify that everything works so-far ...) Then, use an XML module to write it out.
With the amount of RAM that you say you have, the only really-plausible explanation for what you are seeing is ... a bug. Somewhere. And, in this case, I would just drive around it. The obvious path to “get ’er done” is plain, and does not obligate the use of a module that might in fact be buggy.