В Perl, работая с абзацем текста в одной большой длинной строке без разрывов строк, как я могу использовать разбиение и RegEx (или что-то еще), чтобы разбить абзац на куски примерно одинакового размера на границе слова, для отображения моноширинным шрифтом?
Например, как мне изменить это:
"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."
на это:
"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"
Спасибо, Бен