in reply to Re^6: searching two pattern sequentially from one file
in thread searching two pattern sequentially from one file

If your code is printing

into the second loop $readlineqo\n

instead of printing the line it has read, then you have single quotes instead of double quotes. Make sure your code reads:

print "into the second loop $readlineqo\n";

(with the double quotes).

Please reduce your program to a program that still exhibits the problem but is only about 20 lines long, and also show us a short (like 10 lines) example of the problematic input. Using these two parts, we can likely reproduce the problem and diagnose much better where the problem lies.

Usually while reducing your program to a short program that still exhibits the problem, you will find the source yourself. In the event that you don't find the problem yourself, we are here to help you, but you need to help us help you better first by reducing the program to a small size and provide the problematic input data.