note
jeffa
<p>
Where is the data? What does it look like? Why are you splitting data retrieved from
a database? Why didn't you design your database to handle this instead? Why are you
calling the subroutine <tt>execute_it</tt> with no arguments?
And why aren't you using [cpan://Data::Dumper] for debugging your data structures?</p>
<p>
So many problems [bradcathey]. Try this instead: (untested)
<code>
use DBI;
use HTML::Template;
use Data::Dumper;
my $dbh = DBI->connect(
qw(DBI:vendor:database:host user pass),
{RaiseError => 1},
);
my $username = 'jeffa';
my $branches = $dbh->selectall_arrayref(
'SELECT branches FROM users WHERE username = ?',
{Slice => {}}, $username,
);
warn Dumper $branches;
my $tmpl = HTML::Template->new(filehandle => \*DATA);
$tmpl->param(branches => $branches);
print $tmpl->output;
__DATA__
<tmpl_loop branches>
<tmpl_var branches>
</tmpl_loop>
</code>
and let me know how it goes. :)
</p>
<div class="pmsig"><div class="pmsig-18800">
<p>jeffa</p>
<font size=1>
<pre>
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(<a href="http://jeffa.perlmonk.org/tripdid.mp3">the triplet paradiddle with high-hat</a>)
</pre></font>
</div></div>
351713
351713