in reply to Doubt about Template Toolkit
Your provided code doesn't actually define %referencesData so maybe it only has one key?
Here's an SSCCE showing TT running successfully in a loop.
#!/usr/bin/env perl use strict; use warnings; use Template; my $tt = "value = [% thing %]\n"; my $template = Template->new; for my $this (qw/foo bar baz/) { $template->process (\$tt, { thing => $this }); }
🦛
In Section
Seekers of Perl Wisdom