Hey GrandFather,

I think I may be going with your suggestion (Nice Work BTW!)... I just had one question about it.

For the line that starts with "$_ = wrapLine($_) for ..." what does the $_ stand for in this case. I tried just to do a print on the line before that statement just to see what the variable is and I get a "Use of Uninitialized value in concatenation (.) or string at..."

Also, the last line of code that starts "return join "\n## ", $line =~ ......", I'm assuming that the right side of the =~ is a regex? Would you be able to explain a little how that works? I would like to have it split to a new line just at the end of the $kMaxLine length instead of a blank space.
And also assuming your using parenthesis as separators instead of the usual "/", and that "m~" stands for multiline and the "~g" stands for gloabl... Is that right?

Sorry for all the extra questions but I'm just one of those people who has to know how it works lol... Thanks again!

Thanks in Advance,
Matt


In reply to Re^2: Printing Fixed Width Strings and Spliting String into Multiple Lines by mmartin
in thread Printing Fixed Width Strings and Spliting String into Multiple Lines by mmartin

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.