perl -ple"BEGIN{ $/ = \80 }" theBigFile > theNewFile #### perl -e"BEGIN{$/=\80}" -nle"$x.=$_; print $1 while length($x)>80 and $x=~s[(.{1,80},)(?!,)][]" theBigFile > theNewFile