in reply to Re: Yet Another Stupid CGI Question
in thread Yet Another Stupid CGI Question

A couple of things that might make your life a bit easier:

  1. The map function can often be used as an "inline foreach".
  2. In CGI.pm, the Tr and td functions (amongst others) have a neat feature whereby if you pass them a reference to an array, then they return a <tr> or <td> tag for each element in the array.

I don't know what your data structure looks like, but this sample code might help:

my @list = ('chk1|name1|cost1|number1|txt1', 'chk2|name2|cost2|number2|txt2', 'chk3|name3|cost3|number3|txt3'); print table(Tr([map { td([split /\|/, $_])."\n" } @list ]));
--
<http://www.dave.org.uk>

"The first rule of Perl club is you don't talk about Perl club."