in reply to Invoke the Perl string interpolation engine on a string contained in a scalar variable.
There are many other options like Text::Template, Template::Toolkit, and Text::Xslate (which is designed to escape HTML by default, so you will want to configure it for type => 'text').use Mojo::Template; my %vars = ( var1 => 'abel', var2 => 'baker', var3 => 'charlie', ); my $t = Mojo::Template->new(vars => 1); my $rendered = $t->render($text, \%vars);
|
|---|