|Perl: the Markov chain saw|
Re^2: Printing Fixed Width Strings and Spliting String into Multiple Linesby mmartin (Monk)
|on Feb 08, 2012 at 17:05 UTC||Need Help??|
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,