Haggis has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (data formatting)
I have a very long string containing no newlines. I want to insert a "\n" every 128 characters.
Text::Wrap doesn't do what I want as it breaks lines at whole words, resulting in lines that can be less than 128 characters.
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I wrap long lines at a fixed width, ignoring word boundaries?⭐
by davorg (Chancellor) on Jan 12, 2001 at 22:27 UTC | |
|
Re: How do I wrap long lines at a fixed width, ignoring word boundaries?⭐
by chipmunk (Parson) on Jan 12, 2001 at 22:36 UTC | |
|
Re: How do I wrap a long string at 128 characters ignoring word boundaries?
by Anonymous Monk on Oct 15, 2004 at 23:05 UTC | |
|
Re: How do I wrap a long string at 128 characters ignoring word boundaries?
by Anonymous Monk on Oct 15, 2004 at 23:06 UTC |