It would appear the code you posted has some syntax errors,
but the problem is the fact that you're passing Tr() an array of references. Tr would produce a separate row for each element in the array you pass it.
If you pass a single value, like so:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
print table({-border=>'1'},
Tr(
td({-width=>'20%'},'col1'),
td({-width=>'80%'},'col2')
)
);
You should find that solves your problem, (I've removed the square brackets that created the anonymous arrayref).
davis | [reply] [d/l] |