Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Text display like table

Reply
Thread Tools

Text display like table

 
 
ngoc
Guest
Posts: n/a
 
      08-23-2005
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
 
Reply With Quote
 
 
 
 
Anno Siegel
Guest
Posts: n/a
 
      08-23-2005
ngoc <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> 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
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
 
Reply With Quote
 
 
 
 
George
Guest
Posts: n/a
 
      08-24-2005
ngoc wrote:

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS table don't look like html TABLE vitay HTML 8 11-09-2006 05:56 PM
object-like macro used like function-like macro Patrick Kowalzick C++ 5 03-14-2006 03:30 PM
Using 'table values' with non-table elements display-property Jam Pa HTML 3 04-28-2005 07:55 AM
CHtmlView: How to read html text before display, change and give to display changed html code? Marek Kurowski C Programming 1 08-18-2004 06:41 PM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments