in reply to Programmatically generating HTML tables including <thead> and <tbody>
output:use CGI qw(:standard); my @headers = ( th('a'),th('b'),th('b'), ); my @row = ( td('1'),td('2'),td('3'), ); print table( thead( Tr( @headers ) ), tbody( Tr( @row ) ), );
It's not a matter of slipping thead/tbody in, it's a matter of wrapping them around the outside.<table> <thead> <tr> <th> a </th> <th> b </th> <th> b </th> </tr> </thead> <tbody> <tr> <td> 1 </td> <td> 2 </td> <td> 3 </td> </tr> </tbody> </table>
But as everyone else says I'd use templating instead.
($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print
|
|---|