in reply to Reading and executing Perl

No need to worry, the solution is already here, lots of people already did this and put the code into CPAN. You might check out some templating modules like Template::Toolkit, Text::Template, Text::ScriptTemplate,Template::Simple, or just go to http://search.cpan.org/search?query=template&mode=all to get a huge list of Templating modules. Ok, some are geared towards HTML, but often they are general solutions.

UPDATE: Your answers to targetsmart still leave questions open for me: Which parts are fixed and which can you design, change or add? Is the perl code fixed and already there or will it be added and by whom? Trusted or untrusted users?