Charles K. Clarkson <mailto:[EMAIL PROTECTED]> wrote:
: Closer inspection shows the above code doesn't work (right).
: I think you wanted this.
:
: use CGI qw( table Tr td caption );
:
: my @items = ( 1 .. 6 );
: print
: table(
: caption( 'Choose your favourite brand:' ),
: Tr(
: { -align => 'CENTER',
: -valign => 'TOP' },
: td( @items[0 .. 2] ),
: td( @items[3 .. 5] )
: )
: );
Or perhaps you are after this.
print
table(
caption( 'Choose your favourite brand:' ),
Tr(
{ -align => 'CENTER',
-valign => 'TOP' },
td( [ @items[0 .. 2] ] ),
),
Tr(
{ -align => 'CENTER',
-valign => 'TOP' },
td( [ @items[3 .. 5] ] )
)
);
Which produces something like this (edited).
<table>
<caption>Choose your favourite brand:</caption>
<tr valign="TOP" align="CENTER">
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr valign="TOP" align="CENTER">
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
</table>
:
:
: Which produces something like this (edited).
:
: <table>
: <caption>Choose your favourite brand:</caption>
: <tr valign="TOP" align="CENTER">
: <td>1 2 3</td>
: <td>4 5 6</td>
: </tr>
: </table>
:
:
:
: HTH,
:
: Charles K. Clarkson
: --
: Mobile Homes Specialist
: 254 968-8328
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>