in reply to Template Toolkit Embedded Perl
I assume that your real template is more complicated than that but if it isn't you could also do something simple like this:
[% a = 1 %] [% b = a + 1 # or "$a" + 1 %] [download]