Text::ASCIITable 

my $t = Text::ASCIITable->new({ headingText => 'Basket' });
$t->setCols('Id','Name','Price ($)');
$t->addRow(1,'DVD',number( value => 24.4, places => 2));
$t->addRow(2,'CD',number( value => 21.2, places => 2));
$t->addRow(3,'Cassette',number( value => 12.3, places => 2));
$t->addRowLine();
$t->addRow('','Total',number( value => 57.9, places => 2));
print $t;
.------------------------------.
|            Basket            |
+----+-----------------+-------+
| Id | Name            | Price |
+----+-----------------+-------+
|  1 | Dummy product 1 |  24.4 |
|  2 | Dummy product 2 |  21.2 |
|  3 | Dummy product 3 |  12.3 |
+----+-----------------+-------+
|    | Total           |  57.9 |
'----+-----------------+-------'