Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This is an HTML output problem. The key is in those uses you make of CGI.pm's HTML generation methods. What you want presumably (I'm assuming you have one row of data in your example), is a table with each column's label on the top (in the first row of that column) and each subsequent row containing the value for that entry. Here's how the HTML should look:
Without knowing what %dvalue holds, I'd guess that the 'offending' lines are
In both cases, you're passing td an anonymous array holding a single value ($var in the first, a concatenation of two hash values in the second). That will print out a single td tag in both cases; and since you've got those wrapped in Tr calls, those end up on two different rows. What you're getting, in other words is
You need to work to understand how these functions work, how that code translates to HTML ( or maybe you need to understand more HTML ). Finally, just because CGI.pm *can* generate HTML doesn't mean you *need* to use it to =) Look into doing things by hand a bit, it may help out here.
In reply to Re: print output
by arturo
|
|