In Perl, working with a paragraph of text in one big long string with no line breaks, how can I use a split and RegEx (or something else) to split the paragraph into chunks of around the same size at a word boundary, for display in a monospaced font?
For example, how do I change this:
"When you have decided which answer is the most helpful to you, mark it as the accepted answer by clicking on the check box outline to the left of the answer. This lets other people know that you have received a good answer to your question. Doing this is helpful because it shows other people that you're getting value from the community."
into this:
"When you have decided which answer is the most \n"
"helpful to you, mark it as the accepted answer \n"
"by clicking on the check box outline to the \n"
"left of the answer. This lets other people \n"
"know that you have received a good answer to \n"
"your question. Doing this is helpful because \n"
"it shows other people that you're getting \n"
"value from the community.\n"
Thanks, Ben