in reply to
Re^3: How to print certain lines out of a text file.
in thread How to print certain lines out of a text file.
The description of the problem makes sense, but your guess about having a loop inside a loop is very muddled. And you still haven't shown any of your own code.
By way of a better explanation, your solution should be something called a "state machine", where at any given time your program is in one of a finite set of "states" (it seems like two states will suffice here). Whether or not you print a given line depends on what state you're in, and there are certain lines that will cause a change of state. Make sense? Here's pseudo-code, which is pretty close to a perl solution:
initial state is "0";
while there's a line that you've read from the file
set state to "1" if the current line contains "HW/OS/Client"
print the current line if the current state is "1" (true)
set state to "0" if the current line is blank (contains only white-sp
That should do what you want. Let us know if you have trouble turning that into perl code. (It shouldn't be hard.)