in reply to Filling a string with Text::Template

The documentation doesn't show your usage of ->fill_in but a different usage:

my $result = $template->fill_in(HASH => \%vars);

Maybe using the documented version helps?

my $result = $template->fill_in(HASH => { ... });

Also, you're overwriting the template in $string with the value. This shouldn't be problematic but it's confusing.

Replies are listed 'Best First'.
Re^2: Filling a string with Text::Template
by Anonymous Monk on Jun 12, 2019 at 09:50 UTC
    Thanks a lot!