table(1, { id => 't1', headings => [ qw/NAME STRENGTH COMMENT/], data => [ [qw/1 2 no/], [qw/2 3 yes/]], whead => [ [qw/10 20 another/], [qw/100 200 comment/]], } ); #### sub build_attributes { my ($options, @valid) = @_; my @attributes; my %validH; undef @validH{ @valid }; while (my ($attr, $value) = each %$options) { push @attributes, qq($attr="$value") if exists $validH{$attr}; } return @attributes; } #### sub list { my ($tab, $list, $opt) = @_; my @attributes = build_attributes($opt, qw/id class style/); my $format = join ' ', q(), @attributes;