If your web host is running Activestate Perl and have Microsoft Word installed, you could create the file using OLE. See
We used that technique to create Excel files. Now we might have used
instead.
It's sure nice to have a perl-only solution, but if you already have heavily loaded Word documents and templates, it might be easier to use OLE just to fill in a few things, rather than creating a RTF from scratch.