Help for this page

Select Code to Download


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