For longer/complexer scripts you could use Text::Template or one of the many other templating systems on cpan.
Perl 6 in German
In reply to Re: Script Automation by moritz in thread Script Automation by OkieUnix