in reply to Creating an HTML table with 'n' rows
will give you what you want, I believe.#!/usr/local/bin/perl use CGI qw/:standard/; my @data = ([qw/x y z/], [qw/a b c/], [qw/1 2 3/]); print header, table({-width=>200}, [join '', (map Tr(map td($_), @$_), @data)]);
UPDATE
Whoops! I ignored my own advice. The above should work, but isn't too clear logically. This is what I was trying to do:
Hope that helps.#!/usr/local/bin/perl use CGI qw/:standard/; my @data = ([qw/x y z/], [qw/a b c/], [qw/1 2 3/]); print header, table({-width=>200, -border=>1}, [Tr([map (td([map $_, @$_]), @data)])]);
|
|---|