in reply to can you repeat a character N times using HTML::Template?
Is there some way to get HTML::Template to repeat a character N times, say , without resorting to HTML::Template::Expr?Nope. :)
But... using Zaxo's advice above you could get the script to prepare a HTML::Template param for inclusion into your .tmpl template like so:
Then in foo.tmpl you would call the result by using something like:# Original code by Zaxo my $repeated = ' ' x $foo->{'depth'}; my $line = $repeated . $foo->{'name'} . "<br />"; my $template = HTML::Template->new(filename => 'foo.tmpl'); $template->param(html_out => $line);
Not sure if that's the kind of answer you were looking for, but its one way of achieving your desired result.<TMPL_VAR NAME="html_out">
|
|---|
| Replies are listed 'Best First'. |
|---|