Merge branch 'db/rev'
[plumiferos.git] / source / tools / wrap.pl
blobd77d3ef595efc95b2ebeb26ecb7e63c3fcf7d1ce
1 #!/usr/bin/env perl
3 $linelength = 72;
4 $indent = " ";
6 while (<>)
8 @words = split " ", $_;
9 $loc = length($indent);
10 printf "$indent";
11 foreach $word (@words){
12 if ((length($word) + 1 + $loc) > $linelength) {
13 printf "\n$indent";
14 $loc = length($indent);;
16 printf "$word ";
17 $loc += length($word) + 1;
19 printf "\n";