Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How to print table based result (horizontal output) from online database output(10 fields)results in perl script?

Replies are listed 'Best First'.
Re: horizontal output
by davido (Cardinal) on Dec 17, 2004 at 16:39 UTC

    To line up columns you can use Perl's formats (see the perlform docs for info), or perhaps printf. If you're outputting HTML then you'll probably use an HTML table, which is...an HTML issue, not a Perl issue.

    Of course output is printed horizontally by default, and I'll assume that's what you really do mean. The challenge is just to line up columns, which can be done using formats or printf, as previously stated. If you're instead asking how to print vertically the answer is going to be much different.


    Dave

Re: horizontal output
by TomDLux (Vicar) on Dec 17, 2004 at 17:54 UTC

    Actually, the correct way to generate table HTML output is using a template. I prefer HTML::Template, but Template::Toolkit is all the rage.

    --
    TTTATCGGTCGTTATATAGATGTTTGCA