in reply to How to use TR to generate a table row

I believe the function is Tr(), not tr(), so as not to conflict with the tr// translation syntax.

As far as a CGI tutorial, I can't help since I prefer the use of templates to the CGI html functions.

Replies are listed 'Best First'.
Re^2: How to use TR to generate a table row
by kmullin5016 (Acolyte) on Feb 05, 2007 at 15:33 UTC

    Changing it to Tr from tr definitely helped, now the first row is not printing at all, but the rest (which I did not show you the code for) does print, but without the first row, it prints in a rather messy fashion - the column cells do not have the right size.

    Again,what I am trying to do is give Tr a reference to a hash which has all of the first row cells in it. Can I do that?

      Without seeing the code it's hard to know what the problem is. We could guess, but that would almost certainly be a waste of both your time and ours.

      Again,what I am trying to do is give Tr a reference to a hash which has all of the first row cells in it. Can I do that?

      You seem to be changing your story. Previously you have been telling us that you are trying to pass Tr an array. Now you say it's a hash. Which is it?

      A table row doesn't contain data directly. They are supposed to be in td or th elements. Given an array that contains the data for a table row, you need code like this (again, assuming the function-oriented interface to CGI.pm as, in my opinion, it's far easier to use):

      print Tr(td(\@array));