#!/usr/bin/perl -w $| = 1; use Website; my $Website = Website->new( file => 'website-tpl.htm' ); $Website->let('firstname', 'Reto' ); $Website->let('lastname' , 'Hersiczky'); $Website->block('demoBlock', print => $ENV{QUERY_STRING} eq 'block=1' ? 1 : 0); # Populate three records my @table_data = ( "John Doe Washington" , "Foo Bar Neverland" , "Tiger Woods Florida" , ); my $i = 0; my @rowcolors = ('#e0e0e0', 'white'); foreach (@table_data) { my ($firstname, $lastname, $place) = split /\t/; $Website->let('bcol', $rowcolors[$i++ % 2], 'tableRow'); # -- Assign values to data cells (one table row) $Website->let('firstname', $firstname, 'tableRow'); $Website->let('lastname', $lastname , 'tableRow'); $Website->let('place' , $place , 'tableRow'); } $Website->print( contentType_is_set => 0, quiet => 1 );