#!/perl/bin/perl use strict; use warnings; use Template; my $template = Template->new(); my $str = "some [% foo.bar %] stuff\n"; $template->process(\$str, { foo => { bar => 'cool' }, }) or warn $template->error; __END__ some cool stuff
Maybe you shouldn't use the same string for both input and output (that appends the result to the template, at least in my tests).
In reply to Re: TT to process a string
by moritz
in thread TT to process a string
by Cagao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |