Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: A question regarding HTML::Template, tables, and loops

by gryphon (Abbot)
on Sep 02, 2002 at 05:57 UTC ( #194531=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    my @set_of_stuff = (1,3,4,6,7,8,10,12,13,14,15,19,23);
    my $items_per_row = 4;
    ...
      push @row_data, {cell_data=>'&nbsp'} while scalar @row_data < $items
    +_per_row;
      push @table_data, { row_data => \@row_data };
    }
    
  2. or download this
    use HTML::Template;
    my $template = q{
    <TABLE border=1><TMPL_LOOP name="table_data">
    ...
    my $template = HTML::Template->new(scalarref => \$template, option => 
    +'value');
    $template->param(table_data => \@table_data);
    print $template->output();
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194531]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-09-01 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls