On Thu, Oct 18, 2001 at 09:51:31AM -0700, Scott Taylor wrote:
> use CGI qw/:standard *table start_ul/;
> require DBI;
> require HTTP::Date;
> .....
> 
> print table({-border=>undef},
>      caption('Contacts'),
>      Tr({-align=>CENTER,-valign=>TOP},
>      [
>      th(['First Name','Last Name','Title','Company','Work Ph.','Home Ph.',
>          'Fax Number','Other Ph.','Email Addr.','City','Prov.','Postal',
>          'Country','Custom 1','Custom 2','Custom 3','Custome 4','Notes',
>          'Category']),
> 
>      while ( @columns = $cursor->fetchrow ) {
>          td([
>          '$columns[0]', '$columns[1]', '$columns[2]', '$columns[3]',
>          '$columns[4]', '$columns[5]', '$columns[6]', '$columns[7]',
>          '$columns[8]', '$columns[9]', '$columns[10]','$columns[11]',
>          '$columns[12]','$columns[13]','$columns[14]','$columns[15]',
>          '$columns[16]','$columns[17]','$columns[18]','$columns[19]',
>          '$columns[20]'])
>          }
>      ]
>      )

You have:

    while (...) {
        td([)}
    ]

You seem to have your bracketing confused.

Also, I can't see why you would want to create a table composed of the
strings '$columns[0]', '$columns[1]', etc.  Single quotes don't interpolate,
so those variables will not be substituted with their values.  You should be
using either double-quotes or no quotes at all.  Also, there's no need to do
this the hard way:

    td([@columns[0 .. 20]]);

Is a much shorter method of saying what you were trying to say above.


> );


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to