in reply to inserting new lines

What did you try? Is there a rule for where to insert new lines? It's a fairly trivial operation using regular expressions. For example, inserting new lines before semicolons could be done with

#!/usr/bin/perl use warnings; use strict; my $text = <<EOT; xxx ; xxx { xxx } xxx ( xxx ; xxx' EOT $text =~ s/(?=;)/\n/g; print $text;

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.