in reply to Interpolate within Template

To be honest, I've hit a number of memory "bugs" in perl - upgrading from 5.6 to 5.8 has solved almost every single one of them (upgrading to 5.8.1 solving almost all of the rest). If you are using 5.6, and you can upgrade to 5.8, that would be my suggestion.