in reply to Unexpected Output - 2

Your code is recursive. Perhaps you want something like this sort of pseudo-code:

while (not $connected) { get_input(); check_port(); if ($good_port) { $connected = 1; } }

-- Ken

Replies are listed 'Best First'.
Re^2: Unexpected Output - 2
by k_manimuthu (Monk) on Nov 08, 2010 at 12:34 UTC

    Thanks kcott.
    Based on your pseudo - code. I modify the code's. Now it working fine, what i expect

    Thanks a lot