Well there are plenty of modules for writing ini files. Config::IniFiles for example. I don't think Template Toolkit is too good for throwaway scripts. It'd be good if you had to generate the same sort of files all the time. If this is the only time you ever have to generate those ini files, I see nothing wrong with a bunch of prints or heredoc or whatever.