in reply to how do I line-wrap while copying a file to stdout?
The chomp is to get rid of the newline, since we don't really want to count it as a character (i.e. 80 chars + a newline should go on one line even though it's more than 80 chars).chomp; print join("\n", grep(/./, split(/(.{80})/))), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how do I line-wrap while copying a file to stdout?
by chipmunk (Parson) on Apr 20, 2001 at 21:06 UTC | |
|
Re: Re: how do I line-wrap while copying a file to stdout?
by ams (Initiate) on Apr 20, 2001 at 11:24 UTC | |
|
Re: Re: how do I line-wrap while copying a file to stdout?
by bpaulsen (Initiate) on Apr 20, 2001 at 19:28 UTC | |
by bpaulsen (Initiate) on Apr 20, 2001 at 19:32 UTC |