in reply to Textview format, help please !

Maybe use Text::Table to render the table?
Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: Textview format, help please !
by peokai (Novice) on Jul 22, 2010 at 09:57 UTC
    Hi, thanks for the reply. I gave Text::Table a go, but I still end up with output that looks like this:
    1 SA STRIP+ASSEMBLE 1 122.00 2 LOS LABOUR ON PARTS SUPPLY 1 1200.00 3 FBS FAN BLADE SUPPLY 1 1200.00
    I just used
    my $tb = Text::Table->new(); $tb->add($linenum,$kode,$waarde,$entry_qty,$entry_price);
    Can you give me some examples how to use the 'align =>' and/or is_sep functions?
      Maybe you've had a long day, but I gave Text::Table a try and got good results. Try this:
      #!/usr/bin/perl use strict; use warnings; use Text::Table; my $tb = Text::Table->new( "ID", "DESCRIPTION", "QTY", "PRICE" ); $tb->load( [ "1 los", "LABOR ON PARTS", 1, '760.00' ], [ "2 sa", "STRIP", 1, '450.00' ], [ "3 av", "VALUE", 1, '2000.00' ], ); print $tb;
        That works, partially, the problem is it prints out the table as it should be in the cmd window, but the same text in the textview are scrambled :(
      Maybe your problem is that you want to display ASCII art with a proportional font?

      Try to use a monospace font instead, then all the columns should align neatly.