use Text::ScriptTemplate; my $template = Text::ScriptTemplate->new; # Oder Template mit ->load aus einer Datei holen: $template->pack(<<'EOF'); <% for my $x (0 .. $max) { my $y = $x * 2; %>