- or download this
my @words = qw(I Am Cool);
my @numbers = qw(1 2 3);
...
}
# finally, assign the loop data to the loop param, again with a ref
$template->param(THIS_LOOP => \@loop_data);
- or download this
sub getLoopData {
my $table = shift;
...
}
return \@rows;
}
- or download this
my $template->param(foo_loop => &getLoopData('foo', 'bar', 'baz', 'm
+oo'));
- or download this
my @years = ();
my @years_loop = ();
...
push (@years_loop, \%year_data);
}
$template->param(years_loop => \@years_loop);