in reply to blank lines up to a point
If I understand you correctly, the logit subroutine gets called at the code from different places, one line at a time. Thus, you need something like this (untested). I avoid the flipflop operator here, as it's somewhat confusing for me.
{ my $seentext; sub logit { my($line) = @_; $line=~s/\0//g; $line=~/\S/ and $seentext = 1; print OUTF $line; } }
|
|---|