Something
public text v1 · immutable#!/usr/bin/perl
$filecount=1;
open OUT, ">output." . $filecount;
while (<>) {
if ($_=~/^$/) {
$blankcount++;
if ($blankcount==4) {
print STDERR "New section found, opening output." . $filecount;
close OUT;
$blankcount=0;
$filecount++;
open OUT, ">output." . $filecount;
}
} else {
print OUT $_;
}
}
close OUT;