in reply to break up file with no line breaks

Easy task indeed.
use Text::Wrap qw( wrap ); local $Text::Wrap::columns = 80; print wrap('', '', <IN>);

Text::Wrap

Update: I misunderstood the question and missed the magnitude of the file!

use Text::Wrap qw( wrap ); local $Text::Wrap::columns = 80; local $Text::Wrap::break = qr/(?<=,)/; local $/ = ','; print wrap('', '', $_) while <IN>;

Downside: Will break on every comma, even those in the middle of a field.

You can get rid of the Text::Wrap entirely if none of the fields are overly large.

Replies are listed 'Best First'.
Re^2: break up file with no line breaks
by BrowserUk (Patriarch) on Apr 22, 2009 at 03:10 UTC
      I noticed and updated the node while you were replying.