Text display like table

Discussion in 'Perl Misc' started by ngoc, Aug 23, 2005.

  1. ngoc

    ngoc Guest

    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
     
    ngoc, Aug 23, 2005
    #1
    1. Advertising

  2. ngoc

    Anno Siegel Guest

    ngoc <> 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.
     
    Anno Siegel, Aug 23, 2005
    #2
    1. Advertising

  3. ngoc

    George Guest

    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
     
    George, Aug 24, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brett
    Replies:
    3
    Views:
    781
    Jukka K. Korpela
    Dec 24, 2003
  2. Jam Pa
    Replies:
    3
    Views:
    484
    Spartanicus
    Apr 28, 2005
  3. vitay
    Replies:
    8
    Views:
    574
    Stan McCann
    Nov 9, 2006
  4. Marek Kurowski
    Replies:
    1
    Views:
    1,033
    Mark A. Odell
    Aug 18, 2004
  5. Patrick Kowalzick
    Replies:
    5
    Views:
    502
    Patrick Kowalzick
    Mar 14, 2006
Loading...

Share This Page