Text display like table

N

ngoc

Hi
I want to make

column1 column2 column3
------ ------- -------
value1 value2 value3
value1 value2 value3

I evaluate Text::Table, Text::ASCIITable, Text::TabularDisplay
1. Text::Table does not have set_width() function between columns and it
uses {title => ' ' x 5, is_sep => 1}. I do not like this way.
2. Text::TabularDisplay is simple to use, but always has separators for
each values.
3. Text::ASCIITable: the way setting head/column separator is complicated.

Any suggestions for other packages than those that in simple way can I
create format above.

Thanks
ngoc
 
A

Anno Siegel

ngoc said:
Hi
I want to make

column1 column2 column3
------ ------- -------
value1 value2 value3
value1 value2 value3

I evaluate Text::Table, Text::ASCIITable, Text::TabularDisplay
1. Text::Table does not have set_width() function between columns and it
uses {title => ' ' x 5, is_sep => 1}. I do not like this way.

You can also specify column separators as string refs in Text::Table:

my $sep = \ ' ';
my $tb = Text::Table->>new( 'column1', $sep, 'column2' $sep, 'column3');

would also describe your layout.

Anno
 
G

George

ngoc said:
Hi
I want to make

column1 column2 column3
------ ------- -------
value1 value2 value3
value1 value2 value3

I evaluate Text::Table, Text::ASCIITable, Text::TabularDisplay
1. Text::Table does not have set_width() function between columns and
it uses {title => ' ' x 5, is_sep => 1}. I do not like this way. 2.
Text::TabularDisplay is simple to use, but always has separators for
each values. 3. Text::ASCIITable: the way setting head/column
separator is complicated.

Any suggestions for other packages than those that in simple way can
I create format above.

Thanks
ngoc

perldoc -f format
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top