I am trying to scavange a example script I found on the web. The subroutine
is below. Basically I want to extract data from a sql db then generate a
table of values on the fly.  The script below keeps generating a malformed
header error

sub gen_table {
    my $array_ref=query_data('%Ave%');

    my @headings = ('id no.','street no.','street name','city');
    my @rows = th([EMAIL PROTECTED]);
    foreach my $row_array (@$array_ref) {
        my ($id,$str_no,$str_name,$city) = @$row_array;
        push(@rows,td([$id,$str_no,$str_name,$city]));
    }
    print table({-border=>undef,-width=>'25%'},
            caption(b('Wow.  I can multiply!')),
            Tr([EMAIL PROTECTED])
                );

}


Reply via email to