I think you have an excellent point, Todd. I first tried out your code. I produced the same output. So I went to the Embperl site to look up the $cnt variable since I've never used it before with dynamic tables, only the $row and $col ones. The definition states:
"Contains the number of table cells displayed so far. (See HTML tag table.)" Seems to me, too, that by definition of $cnt your code should have had the intended 3 rows/columns. I didn't see any actual examples of $cnt on the website, but found one in the examples that came with the installation: [- @k = keys %ENV -] [-$maxcol=3-] <table> <tr> <td>[+ $i=$cnt +] </td> <td>[+ $k[$cnt] +] </td> <td>[+ $ENV{$k[$i]} +] </td> </tr> </table> Which only outputs: SCRIPT_NAME /pages/test.epl And looking at the source of the output: <table> <tr> <td> </td> <td>SCRIPT_NAME </td> <td>/pages/test.epl </td> </tr> </table> So I too am confused. Could someone further define $cnt and/or explain why it doesn't work as intended? Gavin Spomer Systems Programmer Brooks Library Central Washington University >>> Todd White <[EMAIL PROTECTED]> 09/26/07 6:05 AM >>> I'm wondering if anyone on this list would have any knowledge regarding the following Embperl question? Is anyone aware of a bug I may have encountered? Thanks. ---------- Forwarded message ---------- Date: Wed, 26 Sep 2007 08:06:01 -0400 (EDT) From: Todd White <[EMAIL PROTECTED]> To: embperl@perl.apache.org Subject: RE: $cnt doesn't work for me as advertised Is anyone successfully using the $cnt and $maxcol variables? On Tue, 25 Sep 2007, Todd White wrote: > I'm expecting three rows of three columns, like so: > > A B C > D E F > G > > All I am getting is one row of one column. > > A > > > --Todd > > > On Tue, 25 Sep 2007, Tom Briles wrote: > > > Looks correct to me. What are you expecting? > > > > - Tom > > > > > -----Original Message----- > > > From: Todd White [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, September 25, 2007 3:50 PM > > > To: embperl@perl.apache.org > > > Subject: $cnt doesn't work for me as advertised > > > > > > > > > The variable $cnt doesn't seem to work for me. Am I doing something > > > wrong? > > > > > > Here's my code: > > > ########################################################## > > > <html> > > > <head> > > > <title>$cnt test</title> > > > </head> > > > <body> > > > > > > [- $maxcol = 3; -] > > > [+ $maxcol +]<p> > > > > > > [- @test_arr = ('A', 'B', 'C', 'D', 'E', 'F', 'G'); -] > > > > > > <table> > > > <tr> > > > <td>[+ $test_arr[$cnt] +]</td> > > > </tr> > > > </table> > > > > > > </body> > > > </html> > > > ########################################################### > > > > > > You can run this here: > > > > > > http://www.merit.edu/~tmwhite/test/cnt.epl > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]