in reply to can you repeat a character N times using HTML::Template?

Without HTML::Template specifics, you can use the x operator to get repeated strings,

my $repeated = '&nbsp;' x $foo->{'depth'}; my $line = $repeated . $foo->{'name'} . "<br/>\n";

After Compline,
Zaxo