in reply to Parsing Multiple Lines.
Your routine already distinguishea between data lines and blank (well, nonword) ones. You just haven't used the information. Add an else clause to the end of the if ($line=~/(\w)/) { statement, like:
For other ideas, you could chomp and then test length, or else test for not matching non-whitespace: $line !~ /\S/. Each suggestion accomodates a little different notion of which lines are considered blank.} else { print "This line intentionally left blank.\n"; }
You probably mean to print whole lines, rather than just what you captured ($1).
After Compline,
Zaxo
In Section
Seekers of Perl Wisdom