my $template = new HTML::Template ( filename => "file.tmpl" ); $template->param( outside_of_loop => "foo", the_loop => [ { inside_of_loop => "bar" }, { inside_of_loop => "baz" } ] ); #### Outside: Inside: #### Outside: foo Inside: foo bar Inside: foo baz #### Outside: foo Inside: bar Inside: baz #### my $template = new HTML::Template ( filename => "file.tmpl", global_vars => 1 );