title: Printing array elements in CGI table in Perl
body: <p>I'm trying to print an array elements in a table like this:</p>
  
  <pre><code>+------+-----+-------+------+
  | One  | Two | Three | Four | Header
  +---------------------------+
  | 1    | 2   | 3     | 4    | Row 1
  +---------------------------+
  | 5    | 6   | 7     | 8    | Row 2
  +---------------------------+
  </code></pre>
  
  <p>I used this code:</p>
  
  <pre><code>my @array = ('1', '2', '3', '4', '5', '6', '7','8');
  print $q-&gt;table({-border=&gt;1},
        $q-&gt;Tr($q-&gt;th(['One','Two','Three','Four'])),
        $q-&gt;Tr($q-&gt;td(\@array))
  );
  </code></pre>
  
  <p>But I end up with this:</p>
  
  <pre><code>+------+-----+-------+------+---------+
  | One  | Two | Three | Four |         |
  +---------------------------+---------+
  | 1    | 2   | 3     | 4    | 5 6 7 8 |
  +------+-----+-------+------+---------+
  </code></pre>
  
  <p>So what shall I do different to make it work?</p>