in reply to perl is crashing due to memory leak when the template toolkit output is being dumped into an output file(xml file)

Can you post the output of "perl -v"?

And, if on a Unix like system, the output of "free", or if on Windows, the output (from a CMD window) of "systeminfo | findstr /C:Physical"

I'm curious if your Perl is 32 or 64 bit, and if you're running out of memory, or just using a lot.