Text::AsciiTable -- suggested by AM -- will allow you to have Perl print a plain-text, ink-on-dead-trees (or phosphors on a CRT, for another archaic technology) that will very closely match -- in appearance -- what you showed us.

But we could use some help from you, to help you.

How are you using "tabular?" In other words, do you mean an HTML table, an ASCII art representation such as you showed, or simply a <TAB> separated file (aka "tab separated file, or "TSV"), which can be printed to the aforesaid 'dead-trees' with sufficient spacing to make the columns distinct from one another?

Your followup node (it could have been edited into the original with an appropriate note marking the new content as an UPDATE) seems to me to mean that you have A:B in one array, and C:D in another. If accurate, that's merely going to require that you deal with two arrays, whereas, if "A:B" is a single value, then you can easily put as many such values as you need into a single array.

OTOH, if your "A:B" is a key:value pair (for example, if "A" is on the order of a family name, and "B" is like a given name), then consider using a hash as the intermediate format for your data.


In reply to Re: tabular format of data by ww
in thread tabular format of data by deepak_4682us

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.