I have a text file with Questions and Answers in below.
I wrote something in perl to search a question(s), if match Q's, then print Answers up to End_Q#.
Can someone here help me in printing output?
Example: User search for "How to dot this"
Then it returns:
1. do this
2. do that
3. and do that
Q and A File:
-------------------------
Q1 How to do this
1. do this
2. do that
3. and do that
End_Q1
Q2 What is bah bah bah
- This is
- It is
- And so on
End_Q2
-----------------------
Thank in advance for your help!
Thanh
I wrote something in perl to search a question(s), if match Q's, then print Answers up to End_Q#.
Can someone here help me in printing output?
Example: User search for "How to dot this"
Then it returns:
1. do this
2. do that
3. and do that
Q and A File:
-------------------------
Q1 How to do this
1. do this
2. do that
3. and do that
End_Q1
Q2 What is bah bah bah
- This is
- It is
- And so on
End_Q2
-----------------------
Thank in advance for your help!
Thanh