in reply to Re^3: Formatting of printed SQL Query output
in thread Formatting of printed SQL Query output

hello all, thank you for your replies, they have been very helpful i used this command (as displayed above)
printf "%6d %s\n", split ' ', $_, 2 for @rows;
and I get this output displayed on my DOS screen
16444 3M Singapore 0 10167 ABB Schweiz (CHHOS) - SAP 0 13916 ABB Turbo Systems AG - LVS 0 10163 ABB Turbo Systems AG - SAP 0 8683 ABC
How do I get rid of the '0' that keeps appearing in between the lines??? thanks again

Replies are listed 'Best First'.
Re^5: Formatting of printed SQL Query output
by GrandFather (Saint) on Jul 03, 2007 at 04:52 UTC

    You have blank lines or some such garbage in @rows.

    I strongly recommend that you use strictures (use strict; use warnings;). If you had warnings turned on you would have seen warnings like:

    Use of uninitialized value in printf at noname.pl line 16.

    interspersed through your output. Do you need to chomp your lines before they are added to the array?


    DWIM is Perl's answer to Gödel