So after some reading, I have decided to go with the Text::Format module, it seems to be a pretty handy tool for my project. But I have, of course encountered a problem. Does anyone know how to replace the separator character? That is, instead of just one line, skip two lines(or any other character for that matter), i.e. double spaced. Is this even possible w/wrap? Here's what I am trying to accomplish:
____DATA_______ Here is one big long string which needs to have some formatting done t +o it before I can use it for input in a separate program. I would like it to be formatted exactly as follows (except for the exa +ct line length): ___OUTPUT______ [one tab]'Here is one big long string which '+ 'needs to have some formatting done '+ 'to it before I can use it for input '+ 'in a separate program' (no "+" on last line)
I have figured out how to get a tab in there, and the leading quote, but haven't figured out a way to add the '+ to the end of the lines. I'm pretty sure I need to do something with this: direct from CPAN<quote> If you want to separate your lines with something other than \n then set $Text::Wrap::separator to your preference. This replaces all newlines with $Text::Wrap::separator. If you just to preserve existing newlines but add new breaks with something else, set $Text::Wrap::separator2 instead.</quote>
I can't wrap my head around the syntax though. Is $Text a variable in the module? Can I set it to any value. I couldn't get it to work, got a very ambiguous 'useless setting to a void' or some such vagueness. Ideas?

In reply to Text::Format Module q by jriggs420

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.