Help for this page

Select Code to Download


  1. or download this
    print "<table>\n";
    foreach my $row (@$db_results) {
    ...
       print "\t</tr>\n";
    }
    print "</table>\n";
    
  2. or download this
    # note that passing an array reference to Tr() creates a set of <TR> b
    +locks, one per element of the referenced array
    print table( Tr( [ map { td( $_ ) } @$db_results ] ) );
    
  3. or download this
    # need '*table' and '*Tr' in order to use start_table() and start_Tr()
    use CGI qw( :standard *table *Tr );
    
    ...
                      (map { map { td($_) } @$_ } @$db_results),
                      end_Tr,
                      end_table ), "\n";