"when a thread is spawned it gets an exact copy of the parent thread at the time of spawning". You pointed out an interesting information.
I am initializing all the connections in the main loop and passing the expect string to the thread.
Will re-work on this way of implementation, keeping in mind what you pointed about threads.
Will definetely google the SuperSearch.
You have been very kind. Iam sure you understand why I cannot share my code.
Will keep you all posted if and when i get around this problem.
thanks a tonne.
LAK.