in reply to Getting length of longest value in a column

I had suggest you to use Text::ASCIITable since it provides the convenient options to add reach row.
@array1 = ("a", "a sdfasdf value" , "medium"); @array2 = ("b", "a asdfa asdfasdfsadfs value" , "medium"); @array3 = ("c", "a value" , "high"); use Text::ASCIITable; $t = Text::ASCIITable->new(); $t->setCols('Id', 'Name' ,' Pri'); $t->addRow(@array1); $t->addRow(@array2); $t->addRow(@array3); print $t;
Output:
.------------------------------------------------. | Id | Name | Pri | +----+----------------------------------+--------+ | a | a sdfasdf value | medium | | b | a asdfa asdfasdfsadfs value | medium | | c | a value | high | '----+----------------------------------+--------'