Ben Win Lue has asked for the wisdom of the Perl Monks concerning the following question:
I'm sure this question has been asked before, but I don't find it.
How do I break a string without line breaks into lines of a specific maximum length?
The break should be placed at the latest white space before reaching the maximum line length.
A regular exression? I can't think of a way.
use Text::something??
or just the hard way, like I would do it in C???
Thank you for your attention
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Breaking the lines
by Corion (Patriarch) on Jul 19, 2007 at 08:17 UTC | |
by Ben Win Lue (Friar) on Jul 19, 2007 at 09:01 UTC | |
|
Re: Breaking the lines
by cdarke (Prior) on Jul 19, 2007 at 09:13 UTC | |
|
Re: Breaking the lines
by Anno (Deacon) on Jul 19, 2007 at 10:21 UTC | |
|
Re: Breaking the lines
by GrandFather (Saint) on Jul 19, 2007 at 09:37 UTC | |
|
Re: Breaking the lines
by schwern (Scribe) on Jul 19, 2007 at 20:29 UTC |