$/ = ""; open(F, "<$infile") or die "Could not open $infile for a reading!\n"; while ( ) { my $line = process_paragraph($_); print OUT2, "$line\n"; }