I am processing multiple text files. There is a lot of pre-processing before
the file-reading commences, then each file gets read (but I don't want to
print any blank line) and then there is a lot of post-processing of each
file. In AWK I had a BEGIN block, no print lines in the middle, and a very
long END block. In Perl, I have
pre-code
while (<>) {
lots of processing of file lines with only one wanted "print"
}
post-processing
but I get a blank line output on any line that I don't actually do an
explicit print for. I thought "perl -n" would give me what I need but it
doesn't (of course) because of the wrapped "while(<>) { }" .
Please ... what should I be doing?
Mark
> Please ... what should I be doing?
Can we see the actual code for 'lots of processing of file lines with
only one wanted "print"'?
I'm wondering if you aren't emptying a variable and still printing the
empty variable.
Grant. . . .