Hey guys I have been out of the perl loop for some time now and unfortunatly I feel quite rusty. Anyway I need to do some formatting of data where each line is in the same format, and I have a few section that need to be left or right justified and then padded with whitespace.

I think I remember doing this sort of stuff with HEREDOCS (I think that was what it was called) where you do a bunch of <<<<<<<< <<<< <<< and then when you use that format it makes that each one is the correct ammount of spaces.

As an example if I were to use that format and have this set of data "one" "two" "b" I would get "one      two b   " (Quotes just used to put emphasis on white space).

Unfortuantly, either HEREDOCS is not the right term (which would explain why my searches aren't turning up anything useful) or using HEREDOCS have come out of use. Any help would be appreciated. Thanks.

Edited by Chady -- code tags around whitespaced string


In reply to Formatting Question by debiandude

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.