I replace the line following the searched line. blank or not. Thats what I understand from the question.
And the script does NOT print both lines. Read the source again.
UPDATE: For some reason I answered to the wrong Node! Please Ignore. Sorry to the anon monk.