# SUB shortenlines -- breaks a line of undefined length by replacing # a space with a \n at least every $max chars # Match is not yet capable of dealing correctly w/the likes of "...yakity yak (blah, blah.)" sub shortenlines { use vars qw($post); $rest = "\n\t" . $aphor; @new = $rest =~ m/\G(.{$min,$max}[\x20.])?/gsx; if ($') { $post=$'; $new[$#new] = $post; } print "\n\n\t----- 100 (after splt and jn) --------\n\n"; foreach my $item (@new) { if ($item) { print "\t$item \n"; } } print "\n\n\t------------------------------------\n\n"; exit(108); } # SUB out # alternate print for short lines w/no splBRKs sub out { print "\n\n\t----- SUB OUT 116---------------------\n\n"; print "$new"; print "\n\n\t ---- DONE: FROM SUB out ---------- \n"; exit(121); }