Osiris1975 has asked for the wisdom of the Perl Monks concerning the following question:
but that obviously just truncates the string to 60 characters and drops the rest. I imagine I could use substring and increment the parameters by 60 but then I think I'd end up with a substring out of range error. So I'm stuck as to how I can accomplish this. Any help is appreciated.printf "%.60s\n", $big_string
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to divide single string across multiple lines?
by zwon (Abbot) on Jun 29, 2009 at 19:36 UTC | |
by Osiris1975 (Novice) on Jun 29, 2009 at 19:45 UTC | |
|
Re: How to divide single string across multiple lines?
by toolic (Bishop) on Jun 29, 2009 at 19:28 UTC | |
|
Re: How to divide single string across multiple lines?
by johngg (Canon) on Jun 29, 2009 at 21:19 UTC | |
|
Re: How to divide single string across multiple lines?
by mhearse (Chaplain) on Jun 29, 2009 at 23:40 UTC |