use strict; use warnings; use Template; my @things = ( 'climb dog', 'darkstrike', 'protector', 'sheildbug', 'watcher' ); my $table = Template->new; $table->process( \*DATA, { things => \@things } ) or die $table->error, $/; __DATA__ [%- FOREACH thing = things %] [% thing %] [%- END %]