in reply to Re:{4} how do I line-wrap while copying to stdout?
in thread how do I line-wrap while copying to stdout?

Just to make a little more trouble -- what about:
local $,=$\;
and either
print /(.{1,80})/g
or
print grep /./, split /(.{1,80})/


p

Replies are listed 'Best First'.
Re: Re: Re:{4} how do I line-wrap while copying to stdout?
by merlyn (Sage) on Apr 24, 2001 at 00:43 UTC
      Right, changed it back to "/./".

      p
        But since you aren't using /s, you're going to be doing bad things to strings that have newlines. The other solutions are much better.

        -- Randal L. Schwartz, Perl hacker