It's good that you're telling us the desired output, but why those two words in particular? It's a bit of a riddle. Your attempted solution gives a clue. Would the following be a good statement of the problem?
Print the word that follows each occurrence of pond in the given file.
In reply to Re: read a word from a line
by Narveson
in thread read a word from a line
by sharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |