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