- or download this
use DBIx::Simple;
my @items = DBIx::Simple
-> connect(...)
-> query('SELECT label, votes FROM polls WHERE poll_id = ?', ...)
-> list;
- or download this
my $total = 0;
# Total
...
# Greatest (for width)
my $highest = 0;
$_->[2] > $highest and $highest = $_->[2] for @items;
- or download this
my $width = 300; # Width for 100%
my $html = '<table>';
...
'</div></td></tr>';
}
$html .= '</table>';
- or download this
template_foo($html);